[llvm] r205322 - Simplify debug_loc.dwo handling slightly.
David Blaikie
dblaikie at gmail.com
Tue Apr 1 09:09:50 PDT 2014
Author: dblaikie
Date: Tue Apr 1 11:09:49 2014
New Revision: 205322
URL: http://llvm.org/viewvc/llvm-project?rev=205322&view=rev
Log:
Simplify debug_loc.dwo handling slightly.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp?rev=205322&r1=205321&r2=205322&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp Tue Apr 1 11:09:49 2014
@@ -562,9 +562,7 @@ void DIELocList::EmitValue(AsmPrinter *A
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);
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=205322&r1=205321&r2=205322&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Apr 1 11:09:49 2014
@@ -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 =
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=205322&r1=205321&r2=205322&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Tue Apr 1 11:09:49 2014
@@ -423,7 +423,7 @@ class DwarfDebug : public AsmPrinterHand
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; }
More information about the llvm-commits
mailing list