[llvm] r205437 - [C++11, ARM64] Range based for loops in address type promotion.

Tim Northover t.p.northover at gmail.com
Wed Apr 2 11:18:44 PDT 2014


Hi Jim,

> +    for (auto Inst : Insts) {

Not really a comment on this patch specifically, but how we do C++11
in general. When I saw this I was worried that you'd just created a
copy of a MachineInstr and should have taken it by reference.

Might it be better to use the actual type if the for header will still
fit on one line?

Even ignoring the auto thing, I tend to think a long loop header has
more "authority" in delineating significant blocks of code. Though
perhaps that's just me being used to C++03 loops.

Tim.



More information about the llvm-commits mailing list