forked from OSchip/llvm-project
[ORC] Fix out-of-range comparison errors.
This commit is contained in:
parent
fcf4e25be5
commit
d11a0c5d91
|
@ -34,8 +34,7 @@ extern const char *DispatchFnName;
|
|||
} // end namespace SimpleRemoteEPCDefaultBootstrapSymbolNames
|
||||
|
||||
enum class SimpleRemoteEPCOpcode : uint8_t {
|
||||
FirstOpC,
|
||||
Setup = FirstOpC,
|
||||
Setup,
|
||||
Hangup,
|
||||
Result,
|
||||
CallWrapper,
|
||||
|
|
|
@ -157,8 +157,7 @@ SimpleRemoteEPC::handleMessage(SimpleRemoteEPCOpcode OpC, uint64_t SeqNo,
|
|||
ExecutorAddress TagAddr,
|
||||
SimpleRemoteEPCArgBytesVector ArgBytes) {
|
||||
using UT = std::underlying_type_t<SimpleRemoteEPCOpcode>;
|
||||
if (static_cast<UT>(OpC) < static_cast<UT>(SimpleRemoteEPCOpcode::FirstOpC) ||
|
||||
static_cast<UT>(OpC) > static_cast<UT>(SimpleRemoteEPCOpcode::LastOpC))
|
||||
if (static_cast<UT>(OpC) > static_cast<UT>(SimpleRemoteEPCOpcode::LastOpC))
|
||||
return make_error<StringError>("Unexpected opcode",
|
||||
inconvertibleErrorCode());
|
||||
|
||||
|
|
|
@ -169,8 +169,7 @@ SimpleRemoteEPCServer::handleMessage(SimpleRemoteEPCOpcode OpC, uint64_t SeqNo,
|
|||
ExecutorAddress TagAddr,
|
||||
SimpleRemoteEPCArgBytesVector ArgBytes) {
|
||||
using UT = std::underlying_type_t<SimpleRemoteEPCOpcode>;
|
||||
if (static_cast<UT>(OpC) < static_cast<UT>(SimpleRemoteEPCOpcode::FirstOpC) ||
|
||||
static_cast<UT>(OpC) > static_cast<UT>(SimpleRemoteEPCOpcode::LastOpC))
|
||||
if (static_cast<UT>(OpC) > static_cast<UT>(SimpleRemoteEPCOpcode::LastOpC))
|
||||
return make_error<StringError>("Unexpected opcode",
|
||||
inconvertibleErrorCode());
|
||||
|
||||
|
|
Loading…
Reference in New Issue