[PATCH] D61898: Move symbol resolution code out of SymbolTable class.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 14 07:26:22 PDT 2019
MaskRay added inline comments.
================
Comment at: lld/ELF/SymbolTable.cpp:577
+
+ if (auto *Sym = dyn_cast<Undefined>(New))
+ addUndefined(Old, Sym);
----------------
Have you checked if this chain of `dyn_cast` is as efficient as a switch dispatch on `New->kind()`?
`getSymbolSize` below dispatches on `SymbolKind`.
================
Comment at: lld/ELF/Symbols.h:428
+static size_t getSymbolSize(Symbol *Sym) {
+ switch (Sym->SymbolKind) {
+ case Symbol::CommonKind:
----------------
`Sym->kind()`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61898/new/
https://reviews.llvm.org/D61898
More information about the llvm-commits
mailing list