aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-02-09 00:42:08 +0000
committerDale Johannesen <dalej@apple.com>2010-02-09 00:42:08 +0000
commit6bb2643c1f789638770596bf7583a9d1c4aef1f2 (patch)
treee4e19c64a0582bfa172de1afdeadd7f561a64b0c
parented6fc22e06c3024e878e0697a6b634efafe045d4 (diff)
downloadexternal_llvm-6bb2643c1f789638770596bf7583a9d1c4aef1f2.tar.gz
external_llvm-6bb2643c1f789638770596bf7583a9d1c4aef1f2.tar.bz2
external_llvm-6bb2643c1f789638770596bf7583a9d1c4aef1f2.zip
Debug operands should not be def or kill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95632 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/MachineOperand.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h
index a4db391ea9..72f8775a26 100644
--- a/include/llvm/CodeGen/MachineOperand.h
+++ b/include/llvm/CodeGen/MachineOperand.h
@@ -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;
}