Pemove SymbolTable::addBitcode as it is redundant.

Differential Revision: https://reviews.llvm.org/D61897

llvm-svn: 360846
This commit is contained in:
Rui Ueyama 2019-05-16 03:54:50 +00:00
parent d668873bfe
commit 54ee6df247
3 changed files with 1 additions and 19 deletions

View File

@ -1291,7 +1291,7 @@ static Symbol *createBitcodeSymbol(const std::vector<bool> &KeptComdats,
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>

View File

@ -404,23 +404,6 @@ Symbol *SymbolTable::addShared(const SharedSymbol &New) {
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())

View File

@ -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);