summaryrefslogtreecommitdiffstats
path: root/lld/ELF/SymbolTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/SymbolTable.cpp')
-rw-r--r--lld/ELF/SymbolTable.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp
index b0bd525009e..88747c7bb4c 100644
--- a/lld/ELF/SymbolTable.cpp
+++ b/lld/ELF/SymbolTable.cpp
@@ -164,23 +164,6 @@ template <class ELFT> void SymbolTable<ELFT>::wrap(StringRef Name) {
memcpy(Sym->Body.buffer, Wrap->Body.buffer, sizeof(Wrap->Body));
}
-// Returns a file from which symbol B was created.
-// If B does not belong to any file, returns a nullptr.
-template <class ELFT> InputFile *SymbolTable<ELFT>::findFile(SymbolBody *B) {
- // If this symbol has a definition, follow pointers in the symbol to its
- // defining file.
- if (auto *R = dyn_cast<DefinedRegular<ELFT>>(B))
- if (auto *S = R->Section)
- return S->getFile();
- if (auto *SS = dyn_cast<SharedSymbol<ELFT>>(B))
- return SS->File;
- if (auto *BC = dyn_cast<DefinedBitcode>(B))
- return BC->File;
- if (auto *U = dyn_cast<Undefined>(B))
- return U->File;
- return nullptr;
-}
-
static uint8_t getMinVisibility(uint8_t VA, uint8_t VB) {
if (VA == STV_DEFAULT)
return VB;
OpenPOWER on IntegriCloud