[m-dev.] trivial diff: fix bug with --il-only --use-subdirs

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 17 18:40:12 AEDT 2000


Estimated hours taken: 0.25

compiler/mlds_to_ilasm.m:
	Fix a bug: when `--use-subdirs' was enabled, it was not
	creating the `Mercury/il' subdirectory before trying to write
	to the `Mercury/il/<module>.il' file.  This was because it
	was passing the wrong arguments to module_name_to_file_name.

Workspace: /home/pgrad/fjh/ws/hg
Index: compiler/mlds_to_ilasm.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_ilasm.m,v
retrieving revision 1.3
diff -u -d -r1.3 mlds_to_ilasm.m
--- compiler/mlds_to_ilasm.m	2000/11/09 07:47:04	1.3
+++ compiler/mlds_to_ilasm.m	2000/11/17 07:29:25
@@ -51,7 +51,7 @@
 
 output_mlds(MLDS) -->
 	{ ModuleName = mlds__get_module_name(MLDS) },
-	module_name_to_file_name(ModuleName, ".il", no, ILAsmFile),
+	module_name_to_file_name(ModuleName, ".il", yes, ILAsmFile),
 	output_to_file(ILAsmFile, output_assembler(MLDS), Result),
 
 		% Put the pragma C code into a C++ file.
@@ -59,7 +59,7 @@
 		% we should just put managed C++ foreign code into
 		% this file.
 	( { Result = yes } ->
-		module_name_to_file_name(ModuleName, "__c_code.cpp", no, 
+		module_name_to_file_name(ModuleName, "__c_code.cpp", yes, 
 			CPPFile),
 		output_to_file(CPPFile, output_c_code(MLDS),
 			_Result)

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list