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

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 19:29:07 PST 2019


ruiu added a comment.

In D70505#1754462 <https://reviews.llvm.org/D70505#1754462>, @dblaikie wrote:

> In D70505#1754388 <https://reviews.llvm.org/D70505#1754388>, @ruiu wrote:
>
> > This is my personal taste, but I feel like the former code is simpler, though it doesn't look elegant. The new code looks a bit too smart to me. I also have a little concern to define start and end to SymbolTable class because it is not very clear what are iterated. SymbolTable contains not only symbols but other members.
>
>
> Would it alleviate your concerns if it were more like:
>
>   for (Symbol *sym : symtab->symbols()) 
>   
>
> ?


Yes, that would address my second concern.


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