[PATCH] D11446: For loop style fix

Piotr Padlewski prazek at google.com
Wed Jul 22 23:42:59 PDT 2015


Prazek added inline comments.

================
Comment at: lib/CodeGen/CGVTables.cpp:190
@@ -189,3 +189,3 @@
     // Fix up the returned value, if necessary.
-    for (llvm::Function::iterator I = Fn->begin(), E = Fn->end(); I != E; I++) {
-      llvm::Instruction *T = I->getTerminator();
+    for (auto &BasicBlock : *Fn) {
+      llvm::Instruction *T = BasicBlock.getTerminator();
----------------
majnemer wrote:
> I'd name the variable `BB` instead because `BasicBlock` is the name of a class in LLVM.
that's why I don't like this convention :P


http://reviews.llvm.org/D11446







More information about the cfe-commits mailing list