[lld] r314841 - Inline a small function.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 3 13:44:54 PDT 2017


Author: ruiu
Date: Tue Oct  3 13:44:54 2017
New Revision: 314841

URL: http://llvm.org/viewvc/llvm-project?rev=314841&view=rev
Log:
Inline a small function.

Modified:
    lld/trunk/ELF/Driver.cpp
    lld/trunk/ELF/SymbolTable.cpp
    lld/trunk/ELF/SymbolTable.h

Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=314841&r1=314840&r2=314841&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Tue Oct  3 13:44:54 2017
@@ -1041,7 +1041,8 @@ template <class ELFT> void LinkerDriver:
     return;
 
   // Handle the `--undefined <sym>` options.
-  Symtab->scanUndefinedFlags<ELFT>();
+  for (StringRef S : Config->Undefined)
+    Symtab->fetchIfLazy<ELFT>(S);
 
   // Handle undefined symbols in DSOs.
   Symtab->scanShlibUndefined<ELFT>();

Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=314841&r1=314840&r2=314841&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Tue Oct  3 13:44:54 2017
@@ -593,12 +593,6 @@ template <class ELFT> void SymbolTable::
   }
 }
 
-// Process undefined (-u) flags by loading lazy symbols named by those flags.
-template <class ELFT> void SymbolTable::scanUndefinedFlags() {
-  for (StringRef S : Config->Undefined)
-    fetchIfLazy<ELFT>(S);
-}
-
 // This function takes care of the case in which shared libraries depend on
 // the user program (not the other way, which is usual). Shared libraries
 // may have undefined symbols, expecting that the user program provides
@@ -884,11 +878,6 @@ template void SymbolTable::fetchIfLazy<E
 template void SymbolTable::fetchIfLazy<ELF64LE>(StringRef);
 template void SymbolTable::fetchIfLazy<ELF64BE>(StringRef);
 
-template void SymbolTable::scanUndefinedFlags<ELF32LE>();
-template void SymbolTable::scanUndefinedFlags<ELF32BE>();
-template void SymbolTable::scanUndefinedFlags<ELF64LE>();
-template void SymbolTable::scanUndefinedFlags<ELF64BE>();
-
 template void SymbolTable::scanShlibUndefined<ELF32LE>();
 template void SymbolTable::scanShlibUndefined<ELF32BE>();
 template void SymbolTable::scanShlibUndefined<ELF64LE>();

Modified: lld/trunk/ELF/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=314841&r1=314840&r2=314841&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.h (original)
+++ lld/trunk/ELF/SymbolTable.h Tue Oct  3 13:44:54 2017
@@ -85,7 +85,6 @@ public:
                                    InputFile *File);
 
   template <class ELFT> void fetchIfLazy(StringRef Name);
-  template <class ELFT> void scanUndefinedFlags();
   template <class ELFT> void scanShlibUndefined();
   void scanVersionScript();
 




More information about the llvm-commits mailing list