Changes in directory llvm/include/llvm/Target:

TargetInstrInfo.h updated: 1.88 -> 1.89
---
Log message:

Avoid undesirable behavior when assert is not enabled.

---
Diffs of the changes:  (+3 -3)

 TargetInstrInfo.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/Target/TargetInstrInfo.h
diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.88 
llvm/include/llvm/Target/TargetInstrInfo.h:1.89
--- llvm/include/llvm/Target/TargetInstrInfo.h:1.88     Thu Jun 15 02:22:16 2006
+++ llvm/include/llvm/Target/TargetInstrInfo.h  Thu Jun 15 03:10:27 2006
@@ -149,9 +149,9 @@
   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)



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to