From 295c952b67900e68960bf0be6c29d1393d6916dd Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Wed, 19 Apr 2017 23:42:17 +0000 Subject: Revert "Fix bug that caused DwarfExpression to drop DW_OP_deref from FI locations" This reverts commit r300790. llvm-svn: 300792 --- llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp') 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; -- cgit v1.2.3