[lld] r248643 - [ELF2] Don't inline function and define it in OutputSection.cpp. NFC.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 17:47:56 PDT 2015


Author: davide
Date: Fri Sep 25 19:47:56 2015
New Revision: 248643

URL: http://llvm.org/viewvc/llvm-project?rev=248643&view=rev
Log:
[ELF2] Don't inline function and define it in OutputSection.cpp. NFC.

Reported/Requested by: Rafael Espindola

Modified:
    lld/trunk/ELF/OutputSections.cpp
    lld/trunk/ELF/OutputSections.h

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=248643&r1=248642&r2=248643&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Fri Sep 25 19:47:56 2015
@@ -367,6 +367,14 @@ bool lld::elf2::includeInDynamicSymtab(c
   return B.isUsedInDynamicReloc();
 }
 
+bool lld::elf2::shouldKeepInSymtab(StringRef SymName) {
+  if (Config->DiscardNone)
+    return true;
+
+  // ELF defines dynamic locals as symbols which name starts with ".L".
+  return !(Config->DiscardLocals && SymName.startswith(".L"));
+}
+
 template <class ELFT>
 SymbolTableSection<ELFT>::SymbolTableSection(
     SymbolTable &Table, StringTableSection<ELFT::Is64Bits> &StrTabSec,

Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=248643&r1=248642&r2=248643&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Fri Sep 25 19:47:56 2015
@@ -43,14 +43,7 @@ getLocalSymVA(const typename llvm::objec
 
 bool includeInSymtab(const SymbolBody &B);
 bool includeInDynamicSymtab(const SymbolBody &B);
-
-inline bool shouldKeepInSymtab(StringRef SymName) {
-  if (Config->DiscardNone)
-    return true;
-
-  // ELF defines dynamic locals as symbols which name starts with ".L".
-  return !(Config->DiscardLocals && SymName.startswith(".L"));
-}
+bool shouldKeepInSymtab(StringRef SymName);
 
 // This represents a section in an output file.
 // Different sub classes represent different types of sections. Some contain




More information about the llvm-commits mailing list