[llvm] r332926 - MC: Remove dead code. NFCI.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Mon May 21 18:20:46 PDT 2018


Author: pcc
Date: Mon May 21 18:20:46 2018
New Revision: 332926

URL: http://llvm.org/viewvc/llvm-project?rev=332926&view=rev
Log:
MC: Remove dead code. NFCI.

This code appears to have been copied from the mach-o streamer. It has
no effect in ELF because indirect symbols are specific to mach-o.

Modified:
    llvm/trunk/lib/MC/MCELFStreamer.cpp

Modified: llvm/trunk/lib/MC/MCELFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCELFStreamer.cpp?rev=332926&r1=332925&r2=332926&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCELFStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCELFStreamer.cpp Mon May 21 18:20:46 2018
@@ -188,17 +188,6 @@ static unsigned CombineSymbolTypes(unsig
 
 bool MCELFStreamer::EmitSymbolAttribute(MCSymbol *S, MCSymbolAttr Attribute) {
   auto *Symbol = cast<MCSymbolELF>(S);
-  // Indirect symbols are handled differently, to match how 'as' handles
-  // them. This makes writing matching .o files easier.
-  if (Attribute == MCSA_IndirectSymbol) {
-    // Note that we intentionally cannot use the symbol data here; this is
-    // important for matching the string table that 'as' generates.
-    IndirectSymbolData ISD;
-    ISD.Symbol = Symbol;
-    ISD.Section = getCurrentSectionOnly();
-    getAssembler().getIndirectSymbols().push_back(ISD);
-    return true;
-  }
 
   // Adding a symbol attribute always introduces the symbol, note that an
   // important side effect of calling registerSymbol here is to register




More information about the llvm-commits mailing list