summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-01 16:09:49 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-01 16:09:49 +0000
commite12ab1276d6fa9221fb4bbc9556493aad9b51a0f (patch)
tree0fac8796b68b1f4e405c2c1813b0ddc4150ee2e5 /llvm
parentdd690a2ca48cf8b63f44af4ba8933a8a9d41ec48 (diff)
downloadbcm5719-llvm-e12ab1276d6fa9221fb4bbc9556493aad9b51a0f.tar.gz
bcm5719-llvm-e12ab1276d6fa9221fb4bbc9556493aad9b51a0f.zip
Simplify debug_loc.dwo handling slightly.
llvm-svn: 205322
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.cpp4
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h5
3 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
index 34f070e0edb..cea9df14dfc 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -562,9 +562,7 @@ void DIELocList::EmitValue(AsmPrinter *AP, dwarf::Form Form) const {
DwarfDebug *DD = AP->getDwarfDebug();
MCSymbol *Label = AP->GetTempSymbol("debug_loc", Index);
- if (DD->useSplitDwarf())
- AP->EmitLabelDifference(Label, DD->getDebugLocDWOSym(), 4);
- else if (AP->MAI->doesDwarfUseRelocationsAcrossSections())
+ if (AP->MAI->doesDwarfUseRelocationsAcrossSections() && !DD->useSplitDwarf())
AP->EmitSectionOffset(Label, DD->getDebugLocSym());
else
AP->EmitLabelDifference(Label, DD->getDebugLocSym(), 4);
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index a21fa673118..7cb2567db26 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1893,7 +1893,7 @@ void DwarfDebug::emitSectionLabels() {
emitSectionSym(Asm, TLOF.getDwarfStrDWOSection(), "skel_string");
DwarfAddrSectionSym =
emitSectionSym(Asm, TLOF.getDwarfAddrSection(), "addr_sec");
- DwarfDebugLocDWOSectionSym =
+ DwarfDebugLocSectionSym =
emitSectionSym(Asm, TLOF.getDwarfLocDWOSection(), "skel_loc");
} else
DwarfDebugLocSectionSym =
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 0b0f0a8b7aa..064c0fa7624 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -423,7 +423,7 @@ class DwarfDebug : public AsmPrinterHandler {
MCSymbol *DwarfDebugLocSectionSym, *DwarfLineSectionSym, *DwarfAddrSectionSym;
MCSymbol *FunctionBeginSym, *FunctionEndSym;
MCSymbol *DwarfInfoDWOSectionSym, *DwarfAbbrevDWOSectionSym;
- MCSymbol *DwarfStrDWOSectionSym, *DwarfDebugLocDWOSectionSym;
+ MCSymbol *DwarfStrDWOSectionSym;
MCSymbol *DwarfGnuPubNamesSectionSym, *DwarfGnuPubTypesSectionSym;
// As an optimization, there is no need to emit an entry in the directory
@@ -756,9 +756,6 @@ public:
/// Returns the section symbol for the .debug_loc section.
MCSymbol *getDebugLocSym() const { return DwarfDebugLocSectionSym; }
- /// Returns the section symbol for the .debug_loc section.
- MCSymbol *getDebugLocDWOSym() const { return DwarfDebugLocDWOSectionSym; }
-
/// Returns the previous section that was emitted into.
const MCSection *getPrevSection() const { return PrevSection; }
OpenPOWER on IntegriCloud