Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision 4e2461096b7c7d12f2ee84f0cef534e05aa25d48)
+++ src/InitTweak/FixGlobalInit.cc	(revision 37024fd8a316113ef12f469617e9da9c6cecc309)
@@ -10,5 +10,5 @@
 // Created On       : Mon May 04 15:14:56 2016
 // Last Modified By : Rob Schluntz
-// Last Modified On : Fri May 06 13:51:00 2016
+// Last Modified On : Fri May 06 14:59:26 2016
 // Update Count     : 2
 //
@@ -30,5 +30,5 @@
 	class GlobalFixer : public Visitor {
 	  public:
-		GlobalFixer();
+		GlobalFixer( const std::string & name );
 
 		virtual void visit( ObjectDecl *objDecl );
@@ -41,5 +41,5 @@
 
 		UniqueName tempNamer;
-		CompoundStmt * block;
+		FunctionDecl * initFunction;
 	};
 
@@ -88,14 +88,7 @@
 
 	void fixGlobalInit( std::list< Declaration * > & translationUnit, const std::string & name ) {
-		GlobalFixer fixer;
+		GlobalFixer fixer( name );
 		acceptAll( translationUnit, fixer );
-		// attribute only appears on the forward declaration, so need to make two function decls:
-		// one with the body, one with the attribute.
-		FunctionDecl * initFunction = new FunctionDecl( initName( name ), DeclarationNode::NoStorageClass, LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), 0, false, false );
-		FunctionDecl * forward = initFunction->clone();
-		forward->set_attribute( FunctionDecl::Constructor );
-		initFunction->set_statements( fixer.block );
-		translationUnit.push_back( forward );
-		translationUnit.push_back( initFunction );
+		translationUnit.push_back( fixer.initFunction );
 	}
 
@@ -109,9 +102,10 @@
   }
 
-	GlobalFixer::GlobalFixer() : tempNamer( "_global_init" ), block( new CompoundStmt( noLabels ) ) {
+	GlobalFixer::GlobalFixer( const std::string & name ) : tempNamer( "_global_init" ) {
+		initFunction = new FunctionDecl( initName( name ), DeclarationNode::Static, LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ), false, false, FunctionDecl::Constructor );
 	}
 
 	void GlobalFixer::visit( ObjectDecl *objDecl ) {
-		std::list< Statement * > & statements = block->get_kids();
+		std::list< Statement * > & statements = initFunction->get_statements()->get_kids();
 
 		if ( objDecl->get_init() == NULL ) return;
