[llvm] r222491 - Add curly braces to workaround an MSVC bug.

Zachary Turner zturner at google.com
Thu Nov 20 17:19:10 PST 2014


Author: zturner
Date: Thu Nov 20 19:19:09 2014
New Revision: 222491

URL: http://llvm.org/viewvc/llvm-project?rev=222491&view=rev
Log:
Add curly braces to workaround an MSVC bug.

MSVC can't parse this pattern for range-based for loops.

Modified:
    llvm/trunk/lib/IR/Verifier.cpp

Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=222491&r1=222490&r2=222491&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Thu Nov 20 19:19:09 2014
@@ -1178,8 +1178,10 @@ void Verifier::visitBasicBlock(BasicBloc
   }
 
   // Check that all instructions have their parent pointers set up correctly.
-  for (auto &I: BB)
+  for (auto &I : BB)
+  {
     Assert(I.getParent() == &BB, "Instruction has bogus parent pointer!");
+  }
 }
 
 void Verifier::visitTerminatorInst(TerminatorInst &I) {





More information about the llvm-commits mailing list