Skip to content

Commit e0050d7

Browse files
committed
Fixup for rL326769 (RegState::Debug is being truncated to a bool)
I obviously messed up arguments to MachineOperand::CreateReg in rL326769. This should make it work as intended. Thanks to RKSimon for spotting this. llvm-svn: 326780
1 parent f0a25f7 commit e0050d7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

llvm/lib/CodeGen/LiveDebugVariables.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,11 @@ bool LDVImpl::handleDebugValue(MachineInstr &MI, SlotIndex Idx) {
557557
getUserValue(Var, Expr, MI.getDebugLoc());
558558
if (!Discard)
559559
UV->addDef(Idx, MI.getOperand(0), IsIndirect);
560-
else
561-
UV->addDef(Idx, MachineOperand::CreateReg(0U, RegState::Debug), false);
560+
else {
561+
MachineOperand MO = MachineOperand::CreateReg(0U, false);
562+
MO.setIsDebug();
563+
UV->addDef(Idx, MO, false);
564+
}
562565
return true;
563566
}
564567

0 commit comments

Comments
 (0)