Index: src/ControlStruct/ForExprMutator.cc
===================================================================
--- src/ControlStruct/ForExprMutator.cc	(revision 274ce8c98a0dc1608308c1bd35c41bcd52a1c812)
+++ src/ControlStruct/ForExprMutator.cc	(revision 0dd18fdcc6be610d50195b02a8db7f16db0095ed)
@@ -9,7 +9,7 @@
 // Author           : Rodolfo G. Esteves
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 17 15:32:46 2017
-// Update Count     : 11
+// Last Modified By : Andrew Beach
+// Last Modified On : Fri Aug 18 10:22:00 2017
+// Update Count     : 12
 //
 
@@ -21,35 +21,27 @@
 
 namespace ControlStruct {
-	Statement *ForExprMutator::postmutate( IfStmt *ifStmt ) {
-		std::list<Statement *> &init = ifStmt->get_initialization();
-		if ( init.size() == 0 ) {
-			return ifStmt;
-		} // if
+	Statement *hoist( Statement *originalStmt, std::list<Statement *> &init ) {
+		// If no hoisting is needed, skip:
+		if ( 0 == init.size() ) {
+			return originalStmt;
+		}
 
-		// create compound statement, move initializers outside, leave _for_ as-is
+		// Create compound statement, move initializers outside,
+		// the resut of the original stays as is.
 		CompoundStmt *block = new CompoundStmt( std::list< Label >() );
 		std::list<Statement *> &stmts = block->get_kids();
 		stmts.splice( stmts.end(), init );
 
-		// add for to the new block
-		stmts.push_back( ifStmt );
+		// Add for to the new block.
+		stmts.push_back( originalStmt );
 		return block;
 	}
 
+	Statement *ForExprMutator::postmutate( IfStmt *ifStmt ) {
+		return hoist( ifStmt, ifStmt->initialization );
+	}
 	Statement *ForExprMutator::postmutate( ForStmt *forStmt ) {
 		// hoist any initializer declarations to make them C89 (rather than C99)
-		std::list<Statement *> &init = forStmt->get_initialization();
-		if ( init.size() == 0 ) {
-			return forStmt;
-		} // if
-
-		// create compound statement, move initializers outside, leave _for_ as-is
-		CompoundStmt *block = new CompoundStmt( std::list< Label >() );
-		std::list<Statement *> &stmts = block->get_kids();
-		stmts.splice( stmts.end(), init );
-
-		// add for to the new block
-		stmts.push_back( forStmt );
-		return block;
+		return hoist( forStmt, forStmt->initialization );
 	}
 } // namespace ControlStruct
