Skip to content

Commit

Permalink
Pemove SymbolTable::addBitcode as it is redundant.
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D61897

llvm-svn: 360846
  • Loading branch information
rui314 committed May 16, 2019
1 parent d668873 commit 54ee6df
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion lld/ELF/InputFiles.cpp
Expand Up @@ -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>
Expand Down
17 changes: 0 additions & 17 deletions lld/ELF/SymbolTable.cpp
Expand Up @@ -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())
Expand Down
1 change: 0 additions & 1 deletion lld/ELF/SymbolTable.h
Expand Up @@ -50,7 +50,6 @@ class SymbolTable {
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);
Expand Down

0 comments on commit 54ee6df

Please sign in to comment.