From dc6e0169ae208471f204543a0d4643b34e712a96 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 20 Dec 2016 02:33:30 +0000 Subject: Reapply r289926: attempt to fix windows build llvm-svn: 290158 --- llvm/lib/IR/Verifier.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib') diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index d6ea433d76d..2b9dfcea2fb 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -648,11 +648,12 @@ void Verifier::visitGlobalVariable(const GlobalVariable &GV) { // Visit any debug info attachments. SmallVector MDs; GV.getMetadata(LLVMContext::MD_dbg, MDs); - for (auto *MD : MDs) + for (auto *MD : MDs) { if (auto *GVE = dyn_cast(MD)) visitDIGlobalVariableExpression(*GVE); else AssertDI(false, "!dbg attachment of global variable must be a DIGlobalVariableExpression"); + } if (!GV.hasInitializer()) { visitGlobalValue(GV); -- cgit v1.2.3