[PATCH] D61898: Move symbol resolution code out of SymbolTable class.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 21:17:19 PDT 2019


ruiu marked 2 inline comments as done.
ruiu added inline comments.


================
Comment at: lld/ELF/SymbolTable.cpp:577
+
+  if (auto *Sym = dyn_cast<Undefined>(New))
+    addUndefined(Old, Sym);
----------------
MaskRay wrote:
> Have you checked if this chain of `dyn_cast` is as efficient as a switch dispatch on `New->kind()`?
> 
> `getSymbolSize` below dispatches on `SymbolKind`.
Done.


================
Comment at: lld/ELF/Symbols.h:428
+static size_t getSymbolSize(Symbol *Sym) {
+  switch (Sym->SymbolKind) {
+  case Symbol::CommonKind:
----------------
MaskRay wrote:
> `Sym->kind()`
> 
Done.


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