[llvm] r326780 - Fixup for rL326769 (RegState::Debug is being truncated to a bool)

Bjorn Pettersson via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 6 05:23:28 PST 2018


Author: bjope
Date: Tue Mar  6 05:23:28 2018
New Revision: 326780

URL: http://llvm.org/viewvc/llvm-project?rev=326780&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp

Modified: llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=326780&r1=326779&r2=326780&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp Tue Mar  6 05:23:28 2018
@@ -557,8 +557,11 @@ bool LDVImpl::handleDebugValue(MachineIn
       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;
 }
 




More information about the llvm-commits mailing list