From e5981e5c13b073b62f78f87bdc2d5731e6152a12 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 15 Apr 2014 17:28:26 +0000 Subject: [PATCH] verify-di: Add back braces for MSVC compatability Fixup after r206300. llvm-svn: 206305 --- lib/IR/Verifier.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 887ca7d48eb..e7c67c7e4f9 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -2377,16 +2377,23 @@ void DebugInfoVerifier::verifyDebugInfo() { processInstructions(Finder); // Verify Debug Info. - for (DICompileUnit CU : Finder.compile_units()) + // + // NOTE: The loud braces are necessary for MSVC compatibility. + for (DICompileUnit CU : Finder.compile_units()) { Assert1(CU.Verify(), "DICompileUnit does not Verify!", CU); - for (DISubprogram S : Finder.subprograms()) + } + for (DISubprogram S : Finder.subprograms()) { Assert1(S.Verify(), "DISubprogram does not Verify!", S); - for (DIGlobalVariable GV : Finder.global_variables()) + } + for (DIGlobalVariable GV : Finder.global_variables()) { Assert1(GV.Verify(), "DIGlobalVariable does not Verify!", GV); - for (DIType T : Finder.types()) + } + for (DIType T : Finder.types()) { Assert1(T.Verify(), "DIType does not Verify!", T); - for (DIScope S : Finder.scopes()) + } + for (DIScope S : Finder.scopes()) { Assert1(S.Verify(), "DIScope does not Verify!", S); + } } void DebugInfoVerifier::processInstructions(DebugInfoFinder &Finder) {