[PATCH] D62381: Use SymbolTable::insert() to implement --trace.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 26 23:30:58 PDT 2019


ruiu marked an inline comment as done.
ruiu added inline comments.


================
Comment at: lld/ELF/Driver.cpp:1403
   // or DSOs, so we conservatively mark them as address-significant.
   for (Symbol *S : Symtab->getSymbols())
+    if (!S->isPlaceholder() && S->includeInDynsym())
----------------
MaskRay wrote:
> grimar wrote:
> > grimar wrote:
> > > Should we filter out placeholder symbols returned by `getSymbols` somehow instead?
> > I am thinking about using llvm iterators for example. Just do not sure that spreading `!S->isPlaceholder()` around looks fine.
> Something like `getNonPlaceholderSymbols()` based on `llvm::make_filter_range`?
`make_filter_range` should work, but if we use the function, `getSymbols`'s function signature would be complicated, so I decided to use a lambda instead. How does this look?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62381/new/

https://reviews.llvm.org/D62381





More information about the llvm-commits mailing list