summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-04-19 23:42:17 +0000
committerAdrian Prantl <aprantl@apple.com>2017-04-19 23:42:17 +0000
commit295c952b67900e68960bf0be6c29d1393d6916dd (patch)
tree2d257ea2062ca31676bf9a6b7739caa4955cbdfc /llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
parent2fb59601211a4cd680553f6bd8d6bbeea98942f9 (diff)
downloadbcm5719-llvm-295c952b67900e68960bf0be6c29d1393d6916dd.tar.gz
bcm5719-llvm-295c952b67900e68960bf0be6c29d1393d6916dd.zip
Revert "Fix bug that caused DwarfExpression to drop DW_OP_deref from FI locations"
This reverts commit r300790. llvm-svn: 300792
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
index 55397c3ac09..d21288f4b81 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
@@ -193,10 +193,14 @@ void DwarfExpression::addUnsignedConstant(const APInt &Value) {
}
}
-bool DwarfExpression::addMachineRegExpression(const TargetRegisterInfo &TRI,
+bool DwarfExpression::addMachineLocExpression(const TargetRegisterInfo &TRI,
DIExpressionCursor &ExprCursor,
- unsigned MachineReg,
+ MachineLocation Loc,
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