Remove dead code and update comment.

llvm-svn: 317425
This commit is contained in:
Rui Ueyama 2017-11-04 22:32:56 +00:00
parent f8105cf357
commit 45b81402e3
2 changed files with 3 additions and 21 deletions

View File

@ -162,21 +162,9 @@ template <class ELFT> void SymbolTable::addSymbolWrap(StringRef Name) {
WrapSymbols.push_back({Wrap, Real});
}
// Creates alias for symbol. Used to implement --defsym=ALIAS=SYM.
template <class ELFT>
void SymbolTable::addSymbolAlias(StringRef Alias, StringRef Name) {
Symbol *B = find(Name);
if (!B) {
error("-defsym: undefined symbol: " + Name);
return;
}
defsym(addUndefined<ELFT>(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<ELF64BE>(StringRef, bool, uint8_t,
uint8_t, uint8_t, bool,
InputFile *);
template void SymbolTable::addSymbolAlias<ELF32LE>(StringRef, StringRef);
template void SymbolTable::addSymbolAlias<ELF32BE>(StringRef, StringRef);
template void SymbolTable::addSymbolAlias<ELF64LE>(StringRef, StringRef);
template void SymbolTable::addSymbolAlias<ELF64BE>(StringRef, StringRef);
template void SymbolTable::addCombinedLTOObject<ELF32LE>();
template void SymbolTable::addCombinedLTOObject<ELF32BE>();
template void SymbolTable::addCombinedLTOObject<ELF64LE>();

View File

@ -35,7 +35,6 @@ class SymbolTable {
public:
template <class ELFT> void addFile(InputFile *File);
template <class ELFT> void addCombinedLTOObject();
template <class ELFT> void addSymbolAlias(StringRef Alias, StringRef Name);
template <class ELFT> void addSymbolWrap(StringRef Name);
void applySymbolRenames();