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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 01:28:39 PST 2019


grimar added a comment.

Personally I am in favor of doing this change. The code became much simpler. A little unusual smartness (for LLD code)
added to `SymbolTable` is really short and it doesn't take much time to understand for any first-time reader what it does
(like it might happen sometimes when much smarter iterators logic is used).
Also, this part is not expected to be modified anymore probably, so hopefully we'll just forget about it and enjoy benefits in the rest of the code.



================
Comment at: lld/ELF/Relocations.cpp:806
+          break;
+        }
     if (s) {
----------------
You need bracers for the whole `for` loop too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70505





More information about the llvm-commits mailing list