Simplify debug_loc.dwo handling slightly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205322 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2014-04-01 16:09:49 +00:00
parent 3a64202502
commit fabe5ce566
3 changed files with 3 additions and 8 deletions

View File

@ -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);

View File

@ -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 =

View File

@ -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; }