From: Aaron Ballman Date: Wed, 16 Apr 2014 11:15:57 +0000 (+0000) Subject: Fixing a compile error in debug versions of MSVC. It seems that the range-based for... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=0af5a4e528c18b4f9bcfece16c5ea0fd1dd0f667 Fixing a compile error in debug versions of MSVC. It seems that the range-based for loop is confused by the DEBUG macro expansion unless a compound statement is used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206376 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM64/ARM64CollectLOH.cpp b/lib/Target/ARM64/ARM64CollectLOH.cpp index 713b53d5c54..6e168a83792 100644 --- a/lib/Target/ARM64/ARM64CollectLOH.cpp +++ b/lib/Target/ARM64/ARM64CollectLOH.cpp @@ -492,8 +492,9 @@ static void printReachingDef(const InstrToInstrs *ColorOpToReachedUses, DEBUG(dbgs() << "Def:\n"); DEBUG(DefsIt.first->print(dbgs())); DEBUG(dbgs() << "Reachable uses:\n"); - for (const MachineInstr *MI : DefsIt.second) + for (const MachineInstr *MI : DefsIt.second) { DEBUG(MI->print(dbgs())); + } } } }