Debug operands should not be def or kill.
authorDale Johannesen <dalej@apple.com>
Tue, 9 Feb 2010 00:42:08 +0000 (00:42 +0000)
committerDale Johannesen <dalej@apple.com>
Tue, 9 Feb 2010 00:42:08 +0000 (00:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95632 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineOperand.h

index a4db391ea908f952a957b388745aabdce4f9ade2..72f8775a26afd2c9e2ed1889e0f72d5f1bd29520 100644 (file)
@@ -246,11 +246,13 @@ public:
   
   void setIsUse(bool Val = true) {
     assert(isReg() && "Wrong MachineOperand accessor");
+    assert((Val || !isDebug()) && "Marking a debug operation as def");
     IsDef = !Val;
   }
   
   void setIsDef(bool Val = true) {
     assert(isReg() && "Wrong MachineOperand accessor");
+    assert((!Val || !isDebug()) && "Marking a debug operation as def");
     IsDef = Val;
   }
 
@@ -261,6 +263,7 @@ public:
 
   void setIsKill(bool Val = true) {
     assert(isReg() && !IsDef && "Wrong MachineOperand accessor");
+    assert((!Val || !isDebug()) && "Marking a debug operation as kill");
     IsKill = Val;
   }