[llvm] r206376 - 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.
    Aaron Ballman 
    aaron at aaronballman.com
       
    Wed Apr 16 04:15:57 PDT 2014
    
    
  
Author: aaronballman
Date: Wed Apr 16 06:15:57 2014
New Revision: 206376
URL: http://llvm.org/viewvc/llvm-project?rev=206376&view=rev
Log:
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.
Modified:
    llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp
Modified: llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp?rev=206376&r1=206375&r2=206376&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp (original)
+++ llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp Wed Apr 16 06:15:57 2014
@@ -492,8 +492,9 @@ static void printReachingDef(const Instr
       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()));
+      }
     }
   }
 }
    
    
More information about the llvm-commits
mailing list