mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-04 18:38:05 +00:00
Add isDebug argument to ChangeToRegister; this prevents
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
This commit is contained in:
parent
8e089a9e4d
commit
9653f9ec97
@ -379,7 +379,7 @@ public:
|
|||||||
/// the setReg method should be used.
|
/// the setReg method should be used.
|
||||||
void ChangeToRegister(unsigned Reg, bool isDef, bool isImp = false,
|
void ChangeToRegister(unsigned Reg, bool isDef, bool isImp = false,
|
||||||
bool isKill = false, bool isDead = false,
|
bool isKill = false, bool isDead = false,
|
||||||
bool isUndef = false);
|
bool isUndef = false, bool isDebug = false);
|
||||||
|
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
// Construction methods.
|
// Construction methods.
|
||||||
|
@ -127,7 +127,8 @@ void MachineOperand::ChangeToImmediate(int64_t ImmVal) {
|
|||||||
/// the specified value. If an operand is known to be an register already,
|
/// the specified value. If an operand is known to be an register already,
|
||||||
/// the setReg method should be used.
|
/// the setReg method should be used.
|
||||||
void MachineOperand::ChangeToRegister(unsigned Reg, bool isDef, bool isImp,
|
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
|
// If this operand is already a register operand, use setReg to update the
|
||||||
// register's use/def lists.
|
// register's use/def lists.
|
||||||
if (isReg()) {
|
if (isReg()) {
|
||||||
@ -152,6 +153,7 @@ void MachineOperand::ChangeToRegister(unsigned Reg, bool isDef, bool isImp,
|
|||||||
IsDead = isDead;
|
IsDead = isDead;
|
||||||
IsUndef = isUndef;
|
IsUndef = isUndef;
|
||||||
IsEarlyClobber = false;
|
IsEarlyClobber = false;
|
||||||
|
IsDebug = isDebug;
|
||||||
SubReg = 0;
|
SubReg = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user