diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-04 23:02:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-04 23:02:02 +0000 |
commit | 11b8f30567b514e9ea816fe11bff1c806a9331b9 (patch) | |
tree | 533d7d4fd61db910067f6e36687b7fb9124a7ae7 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 9c69e28553c5c344666aebce266694cf2d73e8d5 (diff) |
stop emitting some dead L labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 12717c68f1..17ffe8fad9 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2444,9 +2444,13 @@ void DwarfDebug::computeSizeAndOffsets() { CompileUnitOffsets[ModuleCU] = 0; } +/// EmitSectionSym - Switch to the specified MCSection and emit an assembler +/// temporary label to it if SymbolStem is specified. static MCSymbol *EmitSectionSym(AsmPrinter *Asm, const MCSection *Section, - const char *SymbolStem) { + const char *SymbolStem = 0) { Asm->OutStreamer.SwitchSection(Section); + if (!SymbolStem) return 0; + MCSymbol *TmpSym = Asm->GetTempSymbol(SymbolStem); Asm->OutStreamer.EmitLabel(TmpSym); return TmpSym; @@ -2467,19 +2471,18 @@ void DwarfDebug::EmitSectionLabels() { EmitSectionSym(Asm, TLOF.getDwarfInfoSection(), "section_info"); DwarfAbbrevSectionSym = EmitSectionSym(Asm, TLOF.getDwarfAbbrevSection(), "section_abbrev"); - EmitSectionSym(Asm, TLOF.getDwarfARangesSection(), "section_aranges"); + EmitSectionSym(Asm, TLOF.getDwarfARangesSection()); if (const MCSection *MacroInfo = TLOF.getDwarfMacroInfoSection()) - EmitSectionSym(Asm, MacroInfo,"section_macinfo"); + EmitSectionSym(Asm, MacroInfo); - EmitSectionSym(Asm, TLOF.getDwarfLineSection(), "section_line"); - EmitSectionSym(Asm, TLOF.getDwarfLocSection(), "section_loc"); - EmitSectionSym(Asm, TLOF.getDwarfPubNamesSection(), "section_pubnames"); - EmitSectionSym(Asm, TLOF.getDwarfPubTypesSection(), "section_pubtypes"); + EmitSectionSym(Asm, TLOF.getDwarfLineSection()); + EmitSectionSym(Asm, TLOF.getDwarfLocSection()); + EmitSectionSym(Asm, TLOF.getDwarfPubNamesSection()); + EmitSectionSym(Asm, TLOF.getDwarfPubTypesSection()); DwarfStrSectionSym = EmitSectionSym(Asm, TLOF.getDwarfStrSection(), "section_str"); - - EmitSectionSym(Asm, TLOF.getDwarfRangesSection(), "section_ranges"); + EmitSectionSym(Asm, TLOF.getDwarfRangesSection()); TextSectionSym = EmitSectionSym(Asm, TLOF.getTextSection(), "text_begin"); |