Index: src/InitTweak/GenInit.cc
===================================================================
--- src/InitTweak/GenInit.cc	(revision 9554d9b8896c38886ce2b6bb9384a2f1927f81d6)
+++ src/InitTweak/GenInit.cc	(revision 70f89d00f25700f0fc226d5210840f0199c6d9f0)
@@ -143,4 +143,10 @@
 		if ( tryConstruct( objDecl ) ) {
 			if ( inFunction ) {
+				// remove qualifiers so that const objects can be initialized, and attach the
+				// qualifiers to ConstructorInit so that they can be replaced after resolving
+				Type * type = objDecl->get_type();
+				Type::Qualifiers qualifiers = type->get_qualifiers();
+				type->get_qualifiers() = Type::Qualifiers();
+
 				if ( ArrayType * at = dynamic_cast< ArrayType * >( objDecl->get_type() ) ) {
 					// call into makeArrayFunction from validate.cc to generate calls to ctor/dtor for each element of array
@@ -165,5 +171,5 @@
 						assert( dtor.size() == 1 );
 
-						objDecl->set_init( new ConstructorInit( ctor.front(), dtor.front(), objDecl->get_init() ) );
+						objDecl->set_init( new ConstructorInit( ctor.front(), dtor.front(), objDecl->get_init(), objDecl, qualifiers ) );
 					} else {
 						// array came with an initializer list: initialize each element
@@ -185,5 +191,5 @@
 					ExprStmt * ctorStmt = new ExprStmt( noLabels, ctor );
 					ExprStmt * dtorStmt = new ExprStmt( noLabels, dtor );
-					objDecl->set_init( new ConstructorInit( ctorStmt, dtorStmt, objDecl->get_init() ) );
+					objDecl->set_init( new ConstructorInit( ctorStmt, dtorStmt, objDecl->get_init(), objDecl, qualifiers ) );
 				}
 			}
Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision 9554d9b8896c38886ce2b6bb9384a2f1927f81d6)
+++ src/InitTweak/InitTweak.cc	(revision 70f89d00f25700f0fc226d5210840f0199c6d9f0)
@@ -83,3 +83,27 @@
     }
   }
+
+  namespace {
+    template<typename CallExpr>
+    std::string funcName( CallExpr * expr ) {
+      Expression * func = expr->get_function();
+      if ( NameExpr * nameExpr = dynamic_cast< NameExpr * >( func ) ) {
+        return nameExpr->get_name();
+      } else if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( func ) ) {
+        return varExpr->get_var()->get_name();
+      } else {
+        assert( false && "Unexpected expression type being called as a function in call expression" );
+      }
+    }
+  }
+
+  std::string getFunctionName( Expression * expr ) {
+    if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( expr ) ) {
+      return funcName( appExpr );
+    } else if ( UntypedExpr * untypedExpr = dynamic_cast< UntypedExpr * > ( expr ) ) {
+      return funcName( untypedExpr );
+    } else {
+      assert( false && "Unexpected expression type passed to getFunctionName" );
+    }
+  }
 }
Index: src/InitTweak/InitTweak.h
===================================================================
--- src/InitTweak/InitTweak.h	(revision 9554d9b8896c38886ce2b6bb9384a2f1927f81d6)
+++ src/InitTweak/InitTweak.h	(revision 70f89d00f25700f0fc226d5210840f0199c6d9f0)
@@ -39,4 +39,7 @@
   /// Currently has assertions that make it less than fully general.
   bool isInstrinsicSingleArgCallStmt( Statement * expr );
+
+  /// returns the name of the function being called
+  std::string getFunctionName(Expression * expr);
 } // namespace
 
