[lld] r256410 - Move a function to a file where it is used.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 24 23:01:09 PST 2015


Author: ruiu
Date: Fri Dec 25 01:01:09 2015
New Revision: 256410

URL: http://llvm.org/viewvc/llvm-project?rev=256410&view=rev
Log:
Move a function to a file where it is used.

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

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=256410&r1=256409&r2=256410&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Fri Dec 25 01:01:09 2015
@@ -1172,16 +1172,6 @@ template <class ELFT> void StringTableSe
   memcpy(Buf, Data.data(), Data.size());
 }
 
-bool lld::elf2::includeInDynamicSymtab(const SymbolBody &B) {
-  uint8_t V = B.getVisibility();
-  if (V != STV_DEFAULT && V != STV_PROTECTED)
-    return false;
-
-  if (Config->ExportDynamic || Config->Shared)
-    return true;
-  return B.isUsedInDynamicReloc();
-}
-
 template <class ELFT>
 bool lld::elf2::shouldKeepInSymtab(const ObjectFile<ELFT> &File,
                                    StringRef SymName,

Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=256410&r1=256409&r2=256410&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Fri Dec 25 01:01:09 2015
@@ -60,9 +60,8 @@ typename llvm::object::ELFFile<ELFT>::ui
 getLocalRelTarget(const ObjectFile<ELFT> &File,
                   const llvm::object::Elf_Rel_Impl<ELFT, IsRela> &Rel,
                   typename llvm::object::ELFFile<ELFT>::uintX_t Addend);
-bool canBePreempted(const SymbolBody *Body, bool NeedsGot);
 
-bool includeInDynamicSymtab(const SymbolBody &B);
+bool canBePreempted(const SymbolBody *Body, bool NeedsGot);
 
 template <class ELFT>
 bool shouldKeepInSymtab(

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=256410&r1=256409&r2=256410&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Fri Dec 25 01:01:09 2015
@@ -604,6 +604,15 @@ template <class ELFT> static bool includ
   return true;
 }
 
+static bool includeInDynamicSymtab(const SymbolBody &B) {
+  uint8_t V = B.getVisibility();
+  if (V != STV_DEFAULT && V != STV_PROTECTED)
+    return false;
+  if (Config->ExportDynamic || Config->Shared)
+    return true;
+  return B.isUsedInDynamicReloc();
+}
+
 // Create output section objects and add them to OutputSections.
 template <class ELFT> void Writer<ELFT>::createSections() {
   // .interp needs to be on the first page in the output file.




More information about the llvm-commits mailing list