[lld] dc6b3f0 - [ELF] Drop an unneeded reference to `symtab` from SymbolTable::addSymbol
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 12:06:10 PDT 2020
Author: William S. Moses
Date: 2020-07-06T12:05:54-07:00
New Revision: dc6b3f03a872a1c551613e49db1d07bbdd8bfebb
URL: https://github.com/llvm/llvm-project/commit/dc6b3f03a872a1c551613e49db1d07bbdd8bfebb
DIFF: https://github.com/llvm/llvm-project/commit/dc6b3f03a872a1c551613e49db1d07bbdd8bfebb.diff
LOG: [ELF] Drop an unneeded reference to `symtab` from SymbolTable::addSymbol
The Symbol Table in LLD references the global object to add a symbol rather than adding it to itself.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D83184
Added:
Modified:
lld/ELF/SymbolTable.cpp
Removed:
################################################################################
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp
index f0a6af437c5f..afc8b05f8767 100644
--- a/lld/ELF/SymbolTable.cpp
+++ b/lld/ELF/SymbolTable.cpp
@@ -94,7 +94,7 @@ Symbol *SymbolTable::insert(StringRef name) {
}
Symbol *SymbolTable::addSymbol(const Symbol &newSym) {
- Symbol *sym = symtab->insert(newSym.getName());
+ Symbol *sym = insert(newSym.getName());
sym->resolve(newSym);
return sym;
}
More information about the llvm-commits
mailing list