[lld] r285767 - Inline a variable that is used only once.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 16:17:47 PDT 2016


Author: ruiu
Date: Tue Nov  1 18:17:47 2016
New Revision: 285767

URL: http://llvm.org/viewvc/llvm-project?rev=285767&view=rev
Log:
Inline a variable that is used only once.

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=285767&r1=285766&r2=285767&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Nov  1 18:17:47 2016
@@ -252,9 +252,9 @@ template <class ELFT> void Writer<ELFT>:
   if (Config->GdbIndex)
     Out<ELFT>::GdbIndex = make<GdbIndexSection<ELFT>>();
 
-  StringRef S = Config->Rela ? ".rela.plt" : ".rel.plt";
   Out<ELFT>::GotPlt = make<GotPltSection<ELFT>>();
-  Out<ELFT>::RelaPlt = make<RelocationSection<ELFT>>(S, false /*Sort*/);
+  Out<ELFT>::RelaPlt = make<RelocationSection<ELFT>>(
+      Config->Rela ? ".rela.plt" : ".rel.plt", false /*Sort*/);
   if (Config->Strip != StripPolicy::All) {
     Out<ELFT>::StrTab = make<StringTableSection<ELFT>>(".strtab", false);
     Out<ELFT>::SymTab = make<SymbolTableSection<ELFT>>(*Out<ELFT>::StrTab);




More information about the llvm-commits mailing list