[unroll] Make range based for loops a bit more explicit and more
authorChandler Carruth <chandlerc@gmail.com>
Fri, 13 Feb 2015 02:45:17 +0000 (02:45 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 13 Feb 2015 02:45:17 +0000 (02:45 +0000)
commit8f2faeecdb185381d127fbb824515249d07edc39
tree2c4611972c0dfbb7a04209f8bf63f68cb353008c
parent1a7dd178f524ef98ae8178f1cf7106e742977555
[unroll] Make range based for loops a bit more explicit and more
readable.

The biggest thing that was causing me problems is recognizing the
references vs. poniters here. I also found that for maps naming the loop
variable as KeyValue helps make it obvious why you don't actually use it
directly. Finally, using 'auto' instead of 'User *' doesn't seem like
a good tradeoff. Much like with the other cases, I like to know its
a pointer, and 'User' is just as long and tells the reader a lot more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229033 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopUnrollPass.cpp