[llvm-commits] [llvm] r100363 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Chris Lattner
sabre at nondot.org
Sun Apr 4 16:02:02 PDT 2010
Author: lattner
Date: Sun Apr 4 18:02:02 2010
New Revision: 100363
URL: http://llvm.org/viewvc/llvm-project?rev=100363&view=rev
Log:
stop emitting some dead L labels.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=100363&r1=100362&r2=100363&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sun Apr 4 18:02:02 2010
@@ -2444,9 +2444,13 @@
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 @@
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");
More information about the llvm-commits
mailing list