]> granicus.if.org Git - llvm/commitdiff
Reapply r289926: attempt to fix windows build
authorAdrian Prantl <aprantl@apple.com>
Tue, 20 Dec 2016 02:33:30 +0000 (02:33 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 20 Dec 2016 02:33:30 +0000 (02:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290158 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/Verifier.cpp

index d6ea433d76dc53aff5a8c3ad6a02b7f0fe9b5b14..2b9dfcea2fb6dcb379650a69f1d589c572e2782c 100644 (file)
@@ -648,11 +648,12 @@ void Verifier::visitGlobalVariable(const GlobalVariable &GV) {
   // Visit any debug info attachments.
   SmallVector<MDNode *, 1> MDs;
   GV.getMetadata(LLVMContext::MD_dbg, MDs);
-  for (auto *MD : MDs)
+  for (auto *MD : MDs) {
     if (auto *GVE = dyn_cast<DIGlobalVariableExpression>(MD))
       visitDIGlobalVariableExpression(*GVE);
     else
       AssertDI(false, "!dbg attachment of global variable must be a DIGlobalVariableExpression");
+  }
 
   if (!GV.hasInitializer()) {
     visitGlobalValue(GV);