[PATCH] D70505: [ELF] Replace SymbolTable::forEachSymbol with filter_iterator begin()/end()

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 12:42:58 PST 2019


MaskRay created this revision.
MaskRay added reviewers: dblaikie, grimar, peter.smith, ruiu.
Herald added subscribers: llvm-commits, dexonsmith, steven_wu, hiraditya, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

D62381 <https://reviews.llvm.org/D62381> introduced forEachSymbol(). It seems that many call sites cannot
be parallelized because the body shared some states. Replace
forEachSymbol with a pair of begin()/end() to simplify code and improve
debuggability (std::function calls take some frames).

It also allows us to use early return to simplify code added in D69650 <https://reviews.llvm.org/D69650>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70505

Files:
  lld/ELF/Driver.cpp
  lld/ELF/LTO.cpp
  lld/ELF/MarkLive.cpp
  lld/ELF/Relocations.cpp
  lld/ELF/SymbolTable.h
  lld/ELF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70505.230315.patch
Type: text/x-patch
Size: 7484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191120/e6e9f8d7/attachment-0001.bin>


More information about the llvm-commits mailing list