Index: src/InitTweak/GenInit.cc
===================================================================
--- src/InitTweak/GenInit.cc	(revision d7dc82447d825854b37e78a7aa777b1a58e7e1b2)
+++ src/InitTweak/GenInit.cc	(revision cc3e4d0fba2ab4dcc1616c82569b8f30a199e333)
@@ -16,17 +16,24 @@
 #include <stack>
 #include <list>
+
+#include "InitTweak.h"
 #include "GenInit.h"
-#include "InitTweak.h"
+
+#include "Common/PassVisitor.h"
+
 #include "SynTree/Declaration.h"
-#include "SynTree/Type.h"
 #include "SynTree/Expression.h"
-#include "SynTree/Statement.h"
 #include "SynTree/Initializer.h"
 #include "SynTree/Mutator.h"
+#include "SynTree/Statement.h"
+#include "SynTree/Type.h"
+
 #include "SymTab/Autogen.h"
 #include "SymTab/Mangler.h"
+
+#include "GenPoly/DeclMutator.h"
 #include "GenPoly/PolyMutator.h"
-#include "GenPoly/DeclMutator.h"
 #include "GenPoly/ScopedSet.h"
+
 #include "ResolvExpr/typeops.h"
 
@@ -37,5 +44,5 @@
 	}
 
-	class ReturnFixer final : public GenPoly::PolyMutator {
+	class ReturnFixer {
 	  public:
 		/// consistently allocates a temporary variable for the return value
@@ -44,8 +51,9 @@
 		static void makeReturnTemp( std::list< Declaration * > &translationUnit );
 
-		typedef GenPoly::PolyMutator Parent;
-		using Parent::mutate;
-		virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ) override;
-		virtual Statement * mutate( ReturnStmt * returnStmt ) override;
+		void premutate( FunctionDecl *functionDecl );
+		void premutate( ReturnStmt * returnStmt );
+
+		at_cleanup_t at_cleanup;
+		std::list< Statement * > stmtsToAddBefore;
 
 	  protected:
@@ -129,9 +137,9 @@
 
 	void ReturnFixer::makeReturnTemp( std::list< Declaration * > & translationUnit ) {
-		ReturnFixer fixer;
+		PassVisitor<ReturnFixer> fixer;
 		mutateAll( translationUnit, fixer );
 	}
 
-	Statement *ReturnFixer::mutate( ReturnStmt *returnStmt ) {
+	void ReturnFixer::premutate( ReturnStmt *returnStmt ) {
 		std::list< DeclarationWithType * > & returnVals = ftype->get_returnVals();
 		assert( returnVals.size() == 0 || returnVals.size() == 1 );
@@ -144,19 +152,17 @@
 			construct->get_args().push_back( new AddressExpr( new VariableExpr( returnVals.front() ) ) );
 			construct->get_args().push_back( returnStmt->get_expr() );
-			stmtsToAdd.push_back(new ExprStmt(noLabels, construct));
+			stmtsToAddBefore.push_back(new ExprStmt(noLabels, construct));
 
 			// return the retVal object
 			returnStmt->set_expr( new VariableExpr( returnVals.front() ) );
 		} // if
-		return returnStmt;
-	}
-
-	DeclarationWithType* ReturnFixer::mutate( FunctionDecl *functionDecl ) {
-		ValueGuard< FunctionType * > oldFtype( ftype );
-		ValueGuard< std::string > oldFuncName( funcName );
+	}
+
+	void ReturnFixer::premutate( FunctionDecl *functionDecl ) {
+		GuardValue( this, ftype );
+		GuardValue( this, funcName );
 
 		ftype = functionDecl->get_functionType();
 		funcName = functionDecl->get_name();
-		return Parent::mutate( functionDecl );
 	}
 
