diff options
author | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2018-03-06 13:23:28 +0000 |
---|---|---|
committer | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2018-03-06 13:23:28 +0000 |
commit | e0050d7f166a835cc5c9c95df095f1a3bc1603ab (patch) | |
tree | d67791a289c7ca81bce020af701430d88abd936e /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | f0a25f7253745d8aa3c3692e53110fc20a569bd0 (diff) | |
download | llvm-e0050d7f166a835cc5c9c95df095f1a3bc1603ab.zip llvm-e0050d7f166a835cc5c9c95df095f1a3bc1603ab.tar.gz llvm-e0050d7f166a835cc5c9c95df095f1a3bc1603ab.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index f3fcd00..8c547cdc 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -557,8 +557,11 @@ bool LDVImpl::handleDebugValue(MachineInstr &MI, SlotIndex Idx) { getUserValue(Var, Expr, MI.getDebugLoc()); if (!Discard) UV->addDef(Idx, MI.getOperand(0), IsIndirect); - else - UV->addDef(Idx, MachineOperand::CreateReg(0U, RegState::Debug), false); + else { + MachineOperand MO = MachineOperand::CreateReg(0U, false); + MO.setIsDebug(); + UV->addDef(Idx, MO, false); + } return true; } |