From: Rui Ueyama Date: Sat, 4 Nov 2017 22:32:56 +0000 (+0000) Subject: Remove dead code and update comment. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45b81402e39aa4a80bbfce7637667074cc6ba9bf;p=platform%2Fupstream%2Fllvm.git Remove dead code and update comment. llvm-svn: 317425 --- diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index 4eec9dc..8a4b148 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -162,21 +162,9 @@ template void SymbolTable::addSymbolWrap(StringRef Name) { WrapSymbols.push_back({Wrap, Real}); } -// Creates alias for symbol. Used to implement --defsym=ALIAS=SYM. -template -void SymbolTable::addSymbolAlias(StringRef Alias, StringRef Name) { - Symbol *B = find(Name); - if (!B) { - error("-defsym: undefined symbol: " + Name); - return; - } - - defsym(addUndefined(Alias), B); -} - -// Apply symbol renames created by -wrap and -defsym. The renames are created -// before LTO in addSymbolWrap() and addSymbolAlias() to have a chance to inform -// LTO (if LTO is running) not to include these symbols in IPO. Now that the +// Apply symbol renames created by -wrap. The renames are created +// before LTO in addSymbolWrap() to have a chance to inform LTO (if +// LTO is running) not to include these symbols in IPO. Now that the // symbols are finalized, we can perform the replacement. void SymbolTable::applySymbolRenames() { // This function rotates 3 symbols: @@ -816,11 +804,6 @@ template Symbol *SymbolTable::addUndefined(StringRef, bool, uint8_t, uint8_t, uint8_t, bool, InputFile *); -template void SymbolTable::addSymbolAlias(StringRef, StringRef); -template void SymbolTable::addSymbolAlias(StringRef, StringRef); -template void SymbolTable::addSymbolAlias(StringRef, StringRef); -template void SymbolTable::addSymbolAlias(StringRef, StringRef); - template void SymbolTable::addCombinedLTOObject(); template void SymbolTable::addCombinedLTOObject(); template void SymbolTable::addCombinedLTOObject(); diff --git a/lld/ELF/SymbolTable.h b/lld/ELF/SymbolTable.h index d7a48b1..45ae59e 100644 --- a/lld/ELF/SymbolTable.h +++ b/lld/ELF/SymbolTable.h @@ -35,7 +35,6 @@ class SymbolTable { public: template void addFile(InputFile *File); template void addCombinedLTOObject(); - template void addSymbolAlias(StringRef Alias, StringRef Name); template void addSymbolWrap(StringRef Name); void applySymbolRenames();