[lld] r256970 - Remove unnecessary `lld::`.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 6 12:11:56 PST 2016


Author: ruiu
Date: Wed Jan  6 14:11:55 2016
New Revision: 256970

URL: http://llvm.org/viewvc/llvm-project?rev=256970&view=rev
Log:
Remove unnecessary `lld::`.

Modified:
    lld/trunk/ELF/Driver.cpp
    lld/trunk/ELF/DriverUtils.cpp
    lld/trunk/ELF/LinkerScript.cpp
    lld/trunk/ELF/MarkLive.cpp
    lld/trunk/ELF/OutputSections.cpp
    lld/trunk/ELF/Symbols.cpp
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=256970&r1=256969&r2=256970&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Wed Jan  6 14:11:55 2016
@@ -26,10 +26,10 @@ using namespace llvm::object;
 using namespace lld;
 using namespace lld::elf2;
 
-Configuration *lld::elf2::Config;
-LinkerDriver *lld::elf2::Driver;
+Configuration *elf2::Config;
+LinkerDriver *elf2::Driver;
 
-void lld::elf2::link(ArrayRef<const char *> Args) {
+void elf2::link(ArrayRef<const char *> Args) {
   Configuration C;
   LinkerDriver D;
   Config = &C;

Modified: lld/trunk/ELF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/DriverUtils.cpp?rev=256970&r1=256969&r2=256970&view=diff
==============================================================================
--- lld/trunk/ELF/DriverUtils.cpp (original)
+++ lld/trunk/ELF/DriverUtils.cpp Wed Jan  6 14:11:55 2016
@@ -51,8 +51,8 @@ public:
 };
 
 // Parses a given list of options.
-opt::InputArgList lld::elf2::parseArgs(llvm::BumpPtrAllocator *A,
-                                       ArrayRef<const char *> Argv) {
+opt::InputArgList elf2::parseArgs(llvm::BumpPtrAllocator *A,
+                                  ArrayRef<const char *> Argv) {
   // Make InputArgList from string vectors.
   ELFOptTable Table;
   unsigned MissingIndex;
@@ -79,7 +79,7 @@ opt::InputArgList lld::elf2::parseArgs(l
   return Args;
 }
 
-std::string lld::elf2::findFromSearchPaths(StringRef Path) {
+std::string elf2::findFromSearchPaths(StringRef Path) {
   for (StringRef Dir : Config->SearchPaths) {
     std::string FullPath = buildSysrootedPath(Dir, Path);
     if (sys::fs::exists(FullPath))
@@ -90,7 +90,7 @@ std::string lld::elf2::findFromSearchPat
 
 // Searches a given library from input search paths, which are filled
 // from -L command line switches. Returns a path to an existent library file.
-std::string lld::elf2::searchLibrary(StringRef Path) {
+std::string elf2::searchLibrary(StringRef Path) {
   std::vector<std::string> Names;
   if (Path[0] == ':') {
     Names.push_back(Path.drop_front());
@@ -110,7 +110,7 @@ std::string lld::elf2::searchLibrary(Str
 // Makes a path by concatenating Dir and File.
 // If Dir starts with '=' the result will be preceded by Sysroot,
 // which can be set with --sysroot command line switch.
-std::string lld::elf2::buildSysrootedPath(StringRef Dir, StringRef File) {
+std::string elf2::buildSysrootedPath(StringRef Dir, StringRef File) {
   SmallString<128> Path;
   if (Dir.startswith("="))
     sys::path::append(Path, Config->Sysroot, Dir.substr(1), File);

Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=256970&r1=256969&r2=256970&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Wed Jan  6 14:11:55 2016
@@ -312,7 +312,7 @@ static bool isUnderSysroot(StringRef Pat
 }
 
 // Entry point. The other functions or classes are private to this file.
-void lld::elf2::readLinkerScript(BumpPtrAllocator *A, MemoryBufferRef MB) {
+void elf2::readLinkerScript(BumpPtrAllocator *A, MemoryBufferRef MB) {
   StringRef Path = MB.getBufferIdentifier();
   LinkerScript(A, MB.getBuffer(), isUnderSysroot(Path)).run();
 }

Modified: lld/trunk/ELF/MarkLive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MarkLive.cpp?rev=256970&r1=256969&r2=256970&view=diff
==============================================================================
--- lld/trunk/ELF/MarkLive.cpp (original)
+++ lld/trunk/ELF/MarkLive.cpp Wed Jan  6 14:11:55 2016
@@ -79,7 +79,7 @@ template <class ELFT> static bool isRese
 // This is the main function of the garbage collector.
 // Starting from GC-root sections, this function visits all reachable
 // sections to set their "Live" bits.
-template <class ELFT> void lld::elf2::markLive(SymbolTable<ELFT> *Symtab) {
+template <class ELFT> void elf2::markLive(SymbolTable<ELFT> *Symtab) {
   SmallVector<InputSection<ELFT> *, 256> Q;
 
   auto Enqueue = [&](InputSectionBase<ELFT> *Sec) {
@@ -125,7 +125,7 @@ template <class ELFT> void lld::elf2::ma
     forEachSuccessor<ELFT>(Q.pop_back_val(), Enqueue);
 }
 
-template void lld::elf2::markLive<ELF32LE>(SymbolTable<ELF32LE> *);
-template void lld::elf2::markLive<ELF32BE>(SymbolTable<ELF32BE> *);
-template void lld::elf2::markLive<ELF64LE>(SymbolTable<ELF64LE> *);
-template void lld::elf2::markLive<ELF64BE>(SymbolTable<ELF64BE> *);
+template void elf2::markLive<ELF32LE>(SymbolTable<ELF32LE> *);
+template void elf2::markLive<ELF32BE>(SymbolTable<ELF32BE> *);
+template void elf2::markLive<ELF64LE>(SymbolTable<ELF64LE> *);
+template void elf2::markLive<ELF64BE>(SymbolTable<ELF64BE> *);

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=256970&r1=256969&r2=256970&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Wed Jan  6 14:11:55 2016
@@ -21,7 +21,7 @@ using namespace llvm::ELF;
 using namespace lld;
 using namespace lld::elf2;
 
-bool lld::elf2::HasGotOffRel = false;
+bool elf2::HasGotOffRel = false;
 
 template <class ELFT>
 OutputSectionBase<ELFT>::OutputSectionBase(StringRef Name, uint32_t sh_type,
@@ -786,7 +786,7 @@ void OutputSection<ELFT>::addSection(Inp
 }
 
 template <class ELFT>
-typename ELFFile<ELFT>::uintX_t lld::elf2::getSymVA(const SymbolBody &S) {
+typename ELFFile<ELFT>::uintX_t elf2::getSymVA(const SymbolBody &S) {
   switch (S.kind()) {
   case SymbolBody::DefinedSyntheticKind: {
     auto &D = cast<DefinedSynthetic<ELFT>>(S);
@@ -824,9 +824,9 @@ typename ELFFile<ELFT>::uintX_t lld::elf
 // For non-local symbols, use getSymVA instead.
 template <class ELFT, bool IsRela>
 typename ELFFile<ELFT>::uintX_t
-lld::elf2::getLocalRelTarget(const ObjectFile<ELFT> &File,
-                             const Elf_Rel_Impl<ELFT, IsRela> &RI,
-                             typename ELFFile<ELFT>::uintX_t Addend) {
+elf2::getLocalRelTarget(const ObjectFile<ELFT> &File,
+                        const Elf_Rel_Impl<ELFT, IsRela> &RI,
+                        typename ELFFile<ELFT>::uintX_t Addend) {
   typedef typename ELFFile<ELFT>::Elf_Sym Elf_Sym;
   typedef typename ELFFile<ELFT>::uintX_t uintX_t;
 
@@ -868,7 +868,7 @@ lld::elf2::getLocalRelTarget(const Objec
 
 // Returns true if a symbol can be replaced at load-time by a symbol
 // with the same name defined in other ELF executable or DSO.
-bool lld::elf2::canBePreempted(const SymbolBody *Body, bool NeedsGot) {
+bool elf2::canBePreempted(const SymbolBody *Body, bool NeedsGot) {
   if (!Body)
     return false;  // Body is a local symbol.
   if (Body->isShared())
@@ -1177,9 +1177,8 @@ template <class ELFT> void StringTableSe
 }
 
 template <class ELFT>
-bool lld::elf2::shouldKeepInSymtab(const ObjectFile<ELFT> &File,
-                                   StringRef SymName,
-                                   const typename ELFFile<ELFT>::Elf_Sym &Sym) {
+bool elf2::shouldKeepInSymtab(const ObjectFile<ELFT> &File, StringRef SymName,
+                              const typename ELFFile<ELFT>::Elf_Sym &Sym) {
   if (Sym.getType() == STT_SECTION)
     return false;
 

Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=256970&r1=256969&r2=256970&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Wed Jan  6 14:11:55 2016
@@ -124,7 +124,7 @@ template <class ELFT> static void doInit
   ElfSym<ELFT>::IgnoreUndef.setVisibility(STV_HIDDEN);
 }
 
-void lld::elf2::initSymbols() {
+void elf2::initSymbols() {
   doInitSymbols<ELF32LE>();
   doInitSymbols<ELF32BE>();
   doInitSymbols<ELF64LE>();
@@ -136,12 +136,12 @@ template int SymbolBody::compare<ELF32BE
 template int SymbolBody::compare<ELF64LE>(SymbolBody *Other);
 template int SymbolBody::compare<ELF64BE>(SymbolBody *Other);
 
-template class lld::elf2::UndefinedElf<ELF32LE>;
-template class lld::elf2::UndefinedElf<ELF32BE>;
-template class lld::elf2::UndefinedElf<ELF64LE>;
-template class lld::elf2::UndefinedElf<ELF64BE>;
+template class elf2::UndefinedElf<ELF32LE>;
+template class elf2::UndefinedElf<ELF32BE>;
+template class elf2::UndefinedElf<ELF64LE>;
+template class elf2::UndefinedElf<ELF64BE>;
 
-template class lld::elf2::DefinedSynthetic<ELF32LE>;
-template class lld::elf2::DefinedSynthetic<ELF32BE>;
-template class lld::elf2::DefinedSynthetic<ELF64LE>;
-template class lld::elf2::DefinedSynthetic<ELF64BE>;
+template class elf2::DefinedSynthetic<ELF32LE>;
+template class elf2::DefinedSynthetic<ELF32BE>;
+template class elf2::DefinedSynthetic<ELF64LE>;
+template class elf2::DefinedSynthetic<ELF64BE>;

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=256970&r1=256969&r2=256970&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Wed Jan  6 14:11:55 2016
@@ -103,7 +103,7 @@ template <class ELFT> static bool should
   return K == ELF64LEKind || K == ELF64BEKind;
 }
 
-template <class ELFT> void lld::elf2::writeResult(SymbolTable<ELFT> *Symtab) {
+template <class ELFT> void elf2::writeResult(SymbolTable<ELFT> *Symtab) {
   // Initialize output sections that are handled by Writer specially.
   // Don't reorder because the order of initialization matters.
   InterpSection<ELFT> Interp;
@@ -1275,7 +1275,7 @@ template <class ELFT> void Writer<ELFT>:
       InputToOutputSection[Name] = OutSec.first;
 }
 
-template void lld::elf2::writeResult<ELF32LE>(SymbolTable<ELF32LE> *Symtab);
-template void lld::elf2::writeResult<ELF32BE>(SymbolTable<ELF32BE> *Symtab);
-template void lld::elf2::writeResult<ELF64LE>(SymbolTable<ELF64LE> *Symtab);
-template void lld::elf2::writeResult<ELF64BE>(SymbolTable<ELF64BE> *Symtab);
+template void elf2::writeResult<ELF32LE>(SymbolTable<ELF32LE> *Symtab);
+template void elf2::writeResult<ELF32BE>(SymbolTable<ELF32BE> *Symtab);
+template void elf2::writeResult<ELF64LE>(SymbolTable<ELF64LE> *Symtab);
+template void elf2::writeResult<ELF64BE>(SymbolTable<ELF64BE> *Symtab);




More information about the llvm-commits mailing list