summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-04-19 23:34:14 +0000
committerAdrian Prantl <aprantl@apple.com>2017-04-19 23:34:14 +0000
commit78ff122709b3ea3667d4892999cf003b360db61e (patch)
tree6f508fd1f8d94de5cd34178043714e60531d1357 /llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
parenta89fd60a913c3caaeef16e22e7760b7c1814442c (diff)
downloadbcm5719-llvm-78ff122709b3ea3667d4892999cf003b360db61e.tar.gz
bcm5719-llvm-78ff122709b3ea3667d4892999cf003b360db61e.zip
Fix bug that caused DwarfExpression to drop DW_OP_deref from FI locations
- introduced in r300522 and found via the Swift LLDB testsuite. The fix is to set the location kind to memory whenever an FrameIndex location is emitted. rdar://problem/31707602 llvm-svn: 300790
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
index d21288f4b81..55397c3ac09 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
@@ -193,14 +193,10 @@ void DwarfExpression::addUnsignedConstant(const APInt &Value) {
}
}
-bool DwarfExpression::addMachineLocExpression(const TargetRegisterInfo &TRI,
+bool DwarfExpression::addMachineRegExpression(const TargetRegisterInfo &TRI,
DIExpressionCursor &ExprCursor,
- MachineLocation Loc,
+ unsigned MachineReg,
unsigned FragmentOffsetInBits) {
- if (Loc.isIndirect())
- LocationKind = Memory;
-
- unsigned MachineReg = Loc.getReg();
auto Fragment = ExprCursor.getFragmentInfo();
if (!addMachineReg(TRI, MachineReg, Fragment ? Fragment->SizeInBits : ~1U))
return false;
OpenPOWER on IntegriCloud