[m-rev.] trivial diff: simplify code in export.m

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Sep 30 21:12:23 AEST 2002


Branches: main
Estimated hours taken: 0.25

compiler/export.m:
	Simplify the code a little.

Workspace: /home/mars/fjh/ws-gcc/mercury
Index: compiler/export.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/export.m,v
retrieving revision 1.63
diff -u -d -r1.63 export.m
--- compiler/export.m	7 Aug 2002 14:40:38 -0000	1.63
+++ compiler/export.m	30 Sep 2002 10:35:19 -0000
@@ -602,22 +602,16 @@
 
 %-----------------------------------------------------------------------------%
 
-% Should this predicate go in llds_out.m?
+% This procedure is used for both the MLDS and LLDS back-ends.
 
 export__produce_header_file(ForeignExportDecls, ModuleName) -->
 		% We always produce a .mh file because with intermodule
 		% optimization enabled the .o file depends on all the
 		% .mh files of the imported modules so we always need to
 		% produce a .mh file even if it contains nothing.
-	export__produce_header_file(ForeignExportDecls, ModuleName, ".mh").
-
-:- pred export__produce_header_file(foreign_export_decls,
-		module_name, string, io__state, io__state).
-:- mode export__produce_header_file(in, in, in, di, uo) is det.
-
-export__produce_header_file(ForeignExportDecls, ModuleName, HeaderExt) -->
 	{ ForeignExportDecls = foreign_export_decls(ForeignDecls,
 			C_ExportDecls) },
+	{ HeaderExt = ".mh" },
 	module_name_to_file_name(ModuleName, HeaderExt, yes, FileName),
 	io__open_output(FileName, Result),
 	(

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list