[PATCH] D11446: For loop style fix

David Majnemer david.majnemer at gmail.com
Wed Jul 22 22:22:14 PDT 2015


majnemer added a subscriber: majnemer.

================
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();
----------------
I'd name the variable `BB` instead because `BasicBlock` is the name of a class in LLVM.


http://reviews.llvm.org/D11446







More information about the cfe-commits mailing list