diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-06-15 08:10:27 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-06-15 08:10:27 +0000 |
commit | f4432fac1425a590dd0e725ed3dd626cf37e1a37 (patch) | |
tree | 5e758cf3482525a8ec88af52625faa64949c5fc5 /include/llvm/Target/TargetInstrInfo.h | |
parent | 8d3af5e7d082dbd029c3987ceadbdcf9e49af6d7 (diff) | |
download | external_llvm-f4432fac1425a590dd0e725ed3dd626cf37e1a37.zip external_llvm-f4432fac1425a590dd0e725ed3dd626cf37e1a37.tar.gz external_llvm-f4432fac1425a590dd0e725ed3dd626cf37e1a37.tar.bz2 |
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
Diffstat (limited to 'include/llvm/Target/TargetInstrInfo.h')
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index 6fb3274..6151c43 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -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) |