D36089: [ELF] - Replace parallelForEach with ranged form.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 03:01:47 PDT 2017


>ruiu added a comment.
>
>I wouldn't request you revert this, but if I were you, I wouldn't have commit this change, because as we discussed, this change contains subtle code that seems only language >experts can understand. I don't think it is overall beneficial to save a few lines of code by writing very "smart" code here.

We still can save few lines if use "const R& Range" instead of "R &&Range". It would work for LLD.
I would be fine with const version too, because personally for me ranged
vesrions of algorithms is much easier to read as I do not need to read where is the begin() and where is end().

So If you prefer 'const' I can change it in that way. I think in this discussion was already that we can use
any way in LLD and change to && version later if we will need it, looks nobody be against using 'const' atm.

Though "R &&Range" is still consistent with the rest LLVM code.

George.


More information about the llvm-commits mailing list