forked from OSchip/llvm-project
Pemove SymbolTable::addBitcode as it is redundant.
Differential Revision: https://reviews.llvm.org/D61897 llvm-svn: 360846
This commit is contained in:
parent
d668873bfe
commit
54ee6df247
|
@ -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>
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue