diff options
author | Adrian Prantl <aprantl@apple.com> | 2017-04-19 23:42:17 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2017-04-19 23:42:17 +0000 |
commit | 295c952b67900e68960bf0be6c29d1393d6916dd (patch) | |
tree | 2d257ea2062ca31676bf9a6b7739caa4955cbdfc /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | 2fb59601211a4cd680553f6bd8d6bbeea98942f9 (diff) | |
download | bcm5719-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/DwarfCompileUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 738e062cb93..4a092ffbdc0 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -556,9 +556,9 @@ DIE *DwarfCompileUnit::constructVariableDIEImpl(const DbgVariable &DV, Ops.push_back(Offset); Ops.append(Expr->elements_begin(), Expr->elements_end()); DIExpressionCursor Cursor(Ops); - DwarfExpr.setMemoryLocationKind(); - DwarfExpr.addMachineRegExpression( - *Asm->MF->getSubtarget().getRegisterInfo(), Cursor, FrameReg); + DwarfExpr.addMachineLocExpression( + *Asm->MF->getSubtarget().getRegisterInfo(), Cursor, + MachineLocation(FrameReg)); DwarfExpr.addExpression(std::move(Cursor)); } addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize()); @@ -780,8 +780,6 @@ void DwarfCompileUnit::addAddress(DIE &Die, dwarf::Attribute Attribute, const MachineLocation &Location) { DIELoc *Loc = new (DIEValueAllocator) DIELoc; DIEDwarfExpression DwarfExpr(*Asm, *this, *Loc); - if (Location.isIndirect()) - DwarfExpr.setMemoryLocationKind(); SmallVector<uint64_t, 8> Ops; if (Location.isIndirect() && Location.getOffset()) { @@ -790,7 +788,7 @@ void DwarfCompileUnit::addAddress(DIE &Die, dwarf::Attribute Attribute, } DIExpressionCursor Cursor(Ops); const TargetRegisterInfo &TRI = *Asm->MF->getSubtarget().getRegisterInfo(); - if (!DwarfExpr.addMachineRegExpression(TRI, Cursor, Location.getReg())) + if (!DwarfExpr.addMachineLocExpression(TRI, Cursor, Location)) return; DwarfExpr.addExpression(std::move(Cursor)); @@ -809,8 +807,6 @@ void DwarfCompileUnit::addComplexAddress(const DbgVariable &DV, DIE &Die, DIEDwarfExpression DwarfExpr(*Asm, *this, *Loc); const DIExpression *DIExpr = DV.getSingleExpression(); DwarfExpr.addFragmentOffset(DIExpr); - if (Location.isIndirect()) - DwarfExpr.setMemoryLocationKind(); SmallVector<uint64_t, 8> Ops; if (Location.isIndirect() && Location.getOffset()) { @@ -820,7 +816,7 @@ void DwarfCompileUnit::addComplexAddress(const DbgVariable &DV, DIE &Die, Ops.append(DIExpr->elements_begin(), DIExpr->elements_end()); DIExpressionCursor Cursor(Ops); const TargetRegisterInfo &TRI = *Asm->MF->getSubtarget().getRegisterInfo(); - if (!DwarfExpr.addMachineRegExpression(TRI, Cursor, Location.getReg())) + if (!DwarfExpr.addMachineLocExpression(TRI, Cursor, Location)) return; DwarfExpr.addExpression(std::move(Cursor)); |