[lld] r360846 - Pemove SymbolTable::addBitcode as it is redundant.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed May 15 20:54:51 PDT 2019
Author: ruiu
Date: Wed May 15 20:54:50 2019
New Revision: 360846
URL: http://llvm.org/viewvc/llvm-project?rev=360846&view=rev
Log:
Pemove SymbolTable::addBitcode as it is redundant.
Differential Revision: https://reviews.llvm.org/D61897
Modified:
lld/trunk/ELF/InputFiles.cpp
lld/trunk/ELF/SymbolTable.cpp
lld/trunk/ELF/SymbolTable.h
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=360846&r1=360845&r2=360846&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Wed May 15 20:54:50 2019
@@ -1291,7 +1291,7 @@ static Symbol *createBitcodeSymbol(const
Defined New(&F, Name, Binding, Visibility, Type, 0, 0, nullptr);
if (CanOmitFromDynSym)
New.ExportDynamic = false;
- return Symtab->addBitcode(New);
+ return Symtab->addDefined(New);
}
template <class ELFT>
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=360846&r1=360845&r2=360846&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Wed May 15 20:54:50 2019
@@ -404,23 +404,6 @@ Symbol *SymbolTable::addShared(const Sha
return Old;
}
-Symbol *SymbolTable::addBitcode(const Defined &New) {
- Symbol *Old = insert(New);
- mergeProperties(Old, New);
-
- if (Old->isPlaceholder()) {
- replaceSymbol(Old, &New);
- return Old;
- }
-
- int Cmp = compare(Old, &New);
- if (Cmp > 0)
- replaceSymbol(Old, &New);
- else if (Cmp == 0)
- reportDuplicate(Old, New.File, nullptr, 0);
- return Old;
-}
-
Symbol *SymbolTable::find(StringRef Name) {
auto It = SymMap.find(CachedHashStringRef(Name));
if (It == SymMap.end())
Modified: lld/trunk/ELF/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=360846&r1=360845&r2=360846&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.h (original)
+++ lld/trunk/ELF/SymbolTable.h Wed May 15 20:54:50 2019
@@ -50,7 +50,6 @@ public:
Symbol *addShared(const SharedSymbol &New);
Symbol *addLazyArchive(const LazyArchive &New);
Symbol *addLazyObject(const LazyObject &New);
- Symbol *addBitcode(const Defined &New);
Symbol *addCommon(const CommonSymbol &New);
Symbol *insert(const Symbol &New);
More information about the llvm-commits
mailing list