[m-rev.] diff: fix foreign dependency bug
Tyson Dowd
trd at cs.mu.OZ.AU
Tue Jul 24 23:58:08 AEST 2001
Hi,
===================================================================
Estimated hours taken: 0.5
Branches: main
compiler/modules.m:
Fix a bug in dependency generation -- we shouldn't count
foreign_code and export pragmas unless they are implemented in a
language we support.
(without this we were generating incorrect dependencies in the
library).
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.180
diff -u -r1.180 modules.m
--- compiler/modules.m 2001/07/23 12:22:08 1.180
+++ compiler/modules.m 2001/07/24 13:53:45
@@ -3821,7 +3821,8 @@
% Counting foreign_decls here causes problems with
% intermodule optimization.
(
- Pragma = foreign_code(Lang, _)
+ Pragma = foreign_code(Lang, _),
+ list__member(Lang, BackendLangs)
->
set__insert(Set0, Lang, Set),
Seen = Seen0
@@ -3864,7 +3865,8 @@
% code for it, rather than assembler code. So
% we need to treat `pragma export' like the
% other pragmas for foreign code.
- Pragma = export(_, _, _, _)
+ Pragma = export(_, _, _, _),
+ list__member(c, BackendLangs)
->
% XXX we assume lang = c for exports
Lang = c,
--
Tyson Dowd #
# Surreal humour isn't everyone's cup of fur.
trd at cs.mu.oz.au #
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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