r193993 - CodeGen: Move an initialization away from an unrelated comment

Justin Bogner mail at justinbogner.com
Mon Nov 4 08:13:18 PST 2013


Author: bogner
Date: Mon Nov  4 10:13:18 2013
New Revision: 193993

URL: http://llvm.org/viewvc/llvm-project?rev=193993&view=rev
Log:
CodeGen: Move an initialization away from an unrelated comment

An initialization somehow found its way in between a comment and the
block of code the comment is about. Moving the initialization makes
this less confusing.

Modified:
    cfe/trunk/lib/CodeGen/CGStmt.cpp

Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=193993&r1=193992&r2=193993&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Mon Nov  4 10:13:18 2013
@@ -643,11 +643,11 @@ void CodeGenFunction::EmitForStmt(const
   if (S.getCond()) {
     // If the for statement has a condition scope, emit the local variable
     // declaration.
-    llvm::BasicBlock *ExitBlock = LoopExit.getBlock();
     if (S.getConditionVariable()) {
       EmitAutoVarDecl(*S.getConditionVariable());
     }
 
+    llvm::BasicBlock *ExitBlock = LoopExit.getBlock();
     // If there are any cleanups between here and the loop-exit scope,
     // create a block to stage a loop exit along.
     if (ForScope.requiresCleanups())





More information about the cfe-commits mailing list