summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-03-10 16:58:10 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-03-10 16:58:10 +0000
commit063d725fd78bbdeff0c5eecab3d1cfa906bd5d12 (patch)
tree2e4ddd2045d506435b4d0c9de8f5d9c060131c0d /llvm/lib/CodeGen/AsmPrinter/DIE.cpp
parentf1b0db154588760352b968d9134f930c77497614 (diff)
downloadbcm5719-llvm-063d725fd78bbdeff0c5eecab3d1cfa906bd5d12.tar.gz
bcm5719-llvm-063d725fd78bbdeff0c5eecab3d1cfa906bd5d12.zip
Store an optional section start label in MCSection.
This makes code that uses section relative expressions (debug info) simpler and less brittle. This is still a bit awkward as the symbol is created late and has to be stored in a mutable field. I will move the symbol creation earlier in the next patch. llvm-svn: 231802
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
index 860293bb9f6..fe99c5c1c7f 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -588,9 +588,9 @@ void DIELocList::EmitValue(const AsmPrinter *AP, dwarf::Form Form) const {
MCSymbol *Label = DD->getDebugLocEntries()[Index].Label;
if (AP->MAI->doesDwarfUseRelocationsAcrossSections() && !DD->useSplitDwarf())
- AP->EmitSectionOffset(Label, DD->getDebugLocSym());
+ AP->emitSectionOffset(Label);
else
- AP->EmitLabelDifference(Label, DD->getDebugLocSym(), 4);
+ AP->EmitLabelDifference(Label, Label->getSection().getBeginSymbol(), 4);
}
#ifndef NDEBUG
OpenPOWER on IntegriCloud