mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Avoid undesirable behavior when assert is not enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28793 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8d3af5e7d0
commit
f4432fac14
@ -149,9 +149,9 @@ public:
|
||||
const TargetRegisterClass
|
||||
*getInstrOperandRegClass(const TargetInstrDescriptor *II, unsigned Op) const {
|
||||
if (Op >= II->numOperands) {
|
||||
if (II->Flags & M_VARIABLE_OPS)
|
||||
return NULL;
|
||||
assert(false && "Invalid operand # of instruction");
|
||||
if (!(II->Flags & M_VARIABLE_OPS))
|
||||
assert(false && "Invalid operand # of instruction");
|
||||
return NULL;
|
||||
}
|
||||
const TargetOperandInfo &toi = II->OpInfo[Op];
|
||||
return (toi.Flags & M_LOOK_UP_PTR_REG_CLASS)
|
||||
|
Loading…
Reference in New Issue
Block a user