From: David Blaikie Date: Sun, 16 Jun 2013 20:34:09 +0000 (+0000) Subject: MachineOperand::setIsDebug should ensure the register is /not/ a definition X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b7770e0b851295141f2b5ec8383380253a75c5f8;p=oota-llvm.git MachineOperand::setIsDebug should ensure the register is /not/ a definition This currently unused function appeared to be asserting in the wrong direction - DebugValues are never definitions of registers, only uses. Curiously we don't perform any of these checks for the more common (& actually used) case of MachineOperand::CreateReg (or other Create functions). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184065 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h index 414770b9ecf..57b28fecf86 100644 --- a/include/llvm/CodeGen/MachineOperand.h +++ b/include/llvm/CodeGen/MachineOperand.h @@ -391,7 +391,7 @@ public: } void setIsDebug(bool Val = true) { - assert(isReg() && IsDef && "Wrong MachineOperand accessor"); + assert(isReg() && !IsDef && "Wrong MachineOperand accessor"); IsDebug = Val; }