Add isDebug argument to ChangeToRegister; this prevents
authorDale Johannesen <dalej@apple.com>
Wed, 10 Feb 2010 00:41:49 +0000 (00:41 +0000)
committerDale Johannesen <dalej@apple.com>
Wed, 10 Feb 2010 00:41:49 +0000 (00:41 +0000)
the field from being used uninitialized later in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95735 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineOperand.h
lib/CodeGen/MachineInstr.cpp

index 72f8775a26afd2c9e2ed1889e0f72d5f1bd29520..0bb6d7d3b5e58b619ded882782f07ffaa759cf92 100644 (file)
@@ -379,7 +379,7 @@ public:
   /// the setReg method should be used.
   void ChangeToRegister(unsigned Reg, bool isDef, bool isImp = false,
                         bool isKill = false, bool isDead = false,
-                        bool isUndef = false);
+                        bool isUndef = false, bool isDebug = false);
   
   //===--------------------------------------------------------------------===//
   // Construction methods.
index 12d30065b8a0313185f979113368477975aaf585..34f7781866bab387cca3660cf7b9cb914f741d37 100644 (file)
@@ -127,7 +127,8 @@ void MachineOperand::ChangeToImmediate(int64_t ImmVal) {
 /// the specified value.  If an operand is known to be an register already,
 /// the setReg method should be used.
 void MachineOperand::ChangeToRegister(unsigned Reg, bool isDef, bool isImp,
-                                      bool isKill, bool isDead, bool isUndef) {
+                                      bool isKill, bool isDead, bool isUndef,
+                                      bool isDebug) {
   // If this operand is already a register operand, use setReg to update the 
   // register's use/def lists.
   if (isReg()) {
@@ -152,6 +153,7 @@ void MachineOperand::ChangeToRegister(unsigned Reg, bool isDef, bool isImp,
   IsDead = isDead;
   IsUndef = isUndef;
   IsEarlyClobber = false;
+  IsDebug = isDebug;
   SubReg = 0;
 }