Remove effectively dead code.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 10 Mar 2015 14:48:01 +0000 (14:48 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 10 Mar 2015 14:48:01 +0000 (14:48 +0000)
Switching back and forth between sections does nothing (other than producing
larger .s files).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231790 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h

index a4e5b8d3aab171f0bc48c9d2e7dff7f488f9a609..f696364cc73d50d3d2b5eb297db83ba8974ab43b 100644 (file)
@@ -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()) {
index a15f200569334ffc0a24f66cccb735b0a2a1a544..41e86c639876caac6fb3e69e12a020b98acb1ef5 100644 (file)
@@ -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.