[lld] r270446 - Remove dead code.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 09:24:22 PDT 2016


Author: ruiu
Date: Mon May 23 11:24:22 2016
New Revision: 270446

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

Since now we always set SHT_PROGBITS to .eh_frame sections,
this code path is not executed at runtime.

Modified:
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=270446&r1=270445&r2=270446&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Mon May 23 11:24:22 2016
@@ -1208,14 +1208,7 @@ OutputSectionFactory<ELFT>::createKey(In
   if (isa<MergeInputSection<ELFT>>(C))
     Alignment = std::max(H->sh_addralign, H->sh_entsize);
 
-  // GNU as can give .eh_frame section type SHT_PROGBITS or SHT_X86_64_UNWIND
-  // depending on the construct. We want to canonicalize it so that
-  // there is only one .eh_frame in the end.
   uint32_t Type = H->sh_type;
-  if (Type == SHT_PROGBITS && Config->EMachine == EM_X86_64 &&
-      isa<EHInputSection<ELFT>>(C))
-    Type = SHT_X86_64_UNWIND;
-
   return SectionKey<ELFT::Is64Bits>{OutsecName, Type, Flags, Alignment};
 }
 




More information about the llvm-commits mailing list