Wrap IR function declaration in a helper method in IRModuleWriter