Add isDebug argument to ChangeToRegister; this prevents

the field from being used uninitialized later in some cases.

llvm-svn: 95735
This commit is contained in:
Dale Johannesen 2010-02-10 00:41:49 +00:00
parent ff68a42121
commit d40d42c9e5
2 changed files with 4 additions and 2 deletions

View 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.

View 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;
}