core/llvm/PR36417-fixup-for-rL326769-RegState-Debug-is-being-truncated.patch
Chaoting Liu f3a60920d6 llvm/clang stack: update to 6.0.0 (see detail)
llvm now split to different packages

- llvm, llvm-libs (in dir llvm/): the main llvm lib and functional part
- lld: (dynamic) linker of llvm
- lldb: debugger of llvm
- compiler-rt: runtime compiler lib for clang to build and run
- clang: C/C++ compiler from llvm project

they should stay in same release version
the update sequence is:
(optional ocaml group->) llvm -> lld -> compiler-rt -> clang
2018-04-20 09:48:53 +01:00

35 lines
1.2 KiB
Diff

From 866cf8f3afa0224e31d36ca0351ac5cb0d303757 Mon Sep 17 00:00:00 2001
From: Bjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Date: Tue, 6 Mar 2018 13:23:28 +0000
Subject: [PATCH] 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326780 91177308-0d34-0410-b5e6-96231b3b80d8
---
lib/CodeGen/LiveDebugVariables.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/CodeGen/LiveDebugVariables.cpp b/lib/CodeGen/LiveDebugVariables.cpp
index f3fcd004defd..8c547cdcff33 100644
--- a/lib/CodeGen/LiveDebugVariables.cpp
+++ b/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;
}