[PATCH] D83184: Avoid using globals in ELF Symbol Table
William Moses via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 5 16:00:22 PDT 2020
wsmoses created this revision.
wsmoses added a project: lld.
Herald added subscribers: llvm-commits, MaskRay, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a reviewer: MaskRay.
Herald added a project: LLVM.
wsmoses updated this revision to Diff 275582.
The Symbol Table in LLD references the global object to add a symbol rather than adding it to itself.
https://reviews.llvm.org/D83184
Files:
lld/ELF/SymbolTable.cpp
Index: lld/ELF/SymbolTable.cpp
===================================================================
--- lld/ELF/SymbolTable.cpp
+++ lld/ELF/SymbolTable.cpp
@@ -94,7 +94,7 @@
}
Symbol *SymbolTable::addSymbol(const Symbol &newSym) {
- Symbol *sym = symtab->insert(newSym.getName());
+ Symbol *sym = insert(newSym.getName());
sym->resolve(newSym);
return sym;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83184.275582.patch
Type: text/x-patch
Size: 371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200705/b3c4b6a6/attachment.bin>
More information about the llvm-commits
mailing list