From 8bcb85a7ac933dfb0e8b5289b7dd540fa35bc402 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 10 Mar 2015 14:48:01 +0000 Subject: [PATCH] Remove effectively dead code. Switching back and forth between sections does nothing (other than producing larger .s files). llvm-svn: 231790 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 17 +---------------- lib/CodeGen/AsmPrinter/DwarfDebug.h | 1 - 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index a4e5b8d3aab..f696364cc73 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -249,11 +249,8 @@ DwarfDebug::~DwarfDebug() { } // 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 = nullptr) { + const char *SymbolStem) { Asm->OutStreamer.SwitchSection(Section); - if (!SymbolStem) - return nullptr; - MCSymbol *TmpSym = Asm->GetTempSymbol(SymbolStem); Asm->OutStreamer.EmitLabel(TmpSym); return TmpSym; @@ -1320,21 +1317,9 @@ void DwarfDebug::emitSectionLabels() { if (useSplitDwarf()) DwarfAbbrevDWOSectionSym = emitSectionSym( Asm, TLOF.getDwarfAbbrevDWOSection(), "section_abbrev_dwo"); - if (GenerateARangeSection) - emitSectionSym(Asm, TLOF.getDwarfARangesSection()); DwarfLineSectionSym = emitSectionSym(Asm, TLOF.getDwarfLineSection(), "section_line"); - if (GenerateGnuPubSections) { - DwarfGnuPubNamesSectionSym = - emitSectionSym(Asm, TLOF.getDwarfGnuPubNamesSection()); - DwarfGnuPubTypesSectionSym = - emitSectionSym(Asm, TLOF.getDwarfGnuPubTypesSection()); - } else if (HasDwarfPubSections) { - emitSectionSym(Asm, TLOF.getDwarfPubNamesSection()); - emitSectionSym(Asm, TLOF.getDwarfPubTypesSection()); - } - DwarfStrSectionSym = emitSectionSym(Asm, TLOF.getDwarfStrSection(), "info_string"); if (useSplitDwarf()) { diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index a15f2005693..41e86c63987 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -252,7 +252,6 @@ class DwarfDebug : public AsmPrinterHandler { MCSymbol *DwarfInfoDWOSectionSym, *DwarfAbbrevDWOSectionSym; MCSymbol *DwarfTypesDWOSectionSym; MCSymbol *DwarfStrDWOSectionSym; - MCSymbol *DwarfGnuPubNamesSectionSym, *DwarfGnuPubTypesSectionSym; // As an optimization, there is no need to emit an entry in the directory // table for the same directory as DW_AT_comp_dir.