Simplify debug_loc.dwo handling slightly.

llvm-svn: 205322
This commit is contained in:
David Blaikie 2014-04-01 16:09:49 +00:00
parent dd690a2ca4
commit e12ab1276d
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(); DwarfDebug *DD = AP->getDwarfDebug();
MCSymbol *Label = AP->GetTempSymbol("debug_loc", Index); MCSymbol *Label = AP->GetTempSymbol("debug_loc", Index);
if (DD->useSplitDwarf()) if (AP->MAI->doesDwarfUseRelocationsAcrossSections() && !DD->useSplitDwarf())
AP->EmitLabelDifference(Label, DD->getDebugLocDWOSym(), 4);
else if (AP->MAI->doesDwarfUseRelocationsAcrossSections())
AP->EmitSectionOffset(Label, DD->getDebugLocSym()); AP->EmitSectionOffset(Label, DD->getDebugLocSym());
else else
AP->EmitLabelDifference(Label, DD->getDebugLocSym(), 4); AP->EmitLabelDifference(Label, DD->getDebugLocSym(), 4);

View File

@ -1893,7 +1893,7 @@ void DwarfDebug::emitSectionLabels() {
emitSectionSym(Asm, TLOF.getDwarfStrDWOSection(), "skel_string"); emitSectionSym(Asm, TLOF.getDwarfStrDWOSection(), "skel_string");
DwarfAddrSectionSym = DwarfAddrSectionSym =
emitSectionSym(Asm, TLOF.getDwarfAddrSection(), "addr_sec"); emitSectionSym(Asm, TLOF.getDwarfAddrSection(), "addr_sec");
DwarfDebugLocDWOSectionSym = DwarfDebugLocSectionSym =
emitSectionSym(Asm, TLOF.getDwarfLocDWOSection(), "skel_loc"); emitSectionSym(Asm, TLOF.getDwarfLocDWOSection(), "skel_loc");
} else } else
DwarfDebugLocSectionSym = DwarfDebugLocSectionSym =

View File

@ -423,7 +423,7 @@ class DwarfDebug : public AsmPrinterHandler {
MCSymbol *DwarfDebugLocSectionSym, *DwarfLineSectionSym, *DwarfAddrSectionSym; MCSymbol *DwarfDebugLocSectionSym, *DwarfLineSectionSym, *DwarfAddrSectionSym;
MCSymbol *FunctionBeginSym, *FunctionEndSym; MCSymbol *FunctionBeginSym, *FunctionEndSym;
MCSymbol *DwarfInfoDWOSectionSym, *DwarfAbbrevDWOSectionSym; MCSymbol *DwarfInfoDWOSectionSym, *DwarfAbbrevDWOSectionSym;
MCSymbol *DwarfStrDWOSectionSym, *DwarfDebugLocDWOSectionSym; MCSymbol *DwarfStrDWOSectionSym;
MCSymbol *DwarfGnuPubNamesSectionSym, *DwarfGnuPubTypesSectionSym; MCSymbol *DwarfGnuPubNamesSectionSym, *DwarfGnuPubTypesSectionSym;
// As an optimization, there is no need to emit an entry in the directory // 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. /// Returns the section symbol for the .debug_loc section.
MCSymbol *getDebugLocSym() const { return DwarfDebugLocSectionSym; } 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. /// Returns the previous section that was emitted into.
const MCSection *getPrevSection() const { return PrevSection; } const MCSection *getPrevSection() const { return PrevSection; }