* check for dup uses

This commit is contained in:
peter 1999-03-16 21:07:25 +00:00
parent c77f7deb26
commit 5b7745e420

View File

@ -550,6 +550,7 @@ unit pmodules;
procedure loadunits; procedure loadunits;
var var
s : stringid; s : stringid;
pu,
hp : pused_unit; hp : pused_unit;
hp2 : pmodule; hp2 : pmodule;
hp3 : psymtable; hp3 : psymtable;
@ -563,8 +564,16 @@ unit pmodules;
repeat repeat
s:=pattern; s:=pattern;
consume(ID); consume(ID);
{ check if the unit is already used }
pu:=pused_unit(current_module^.used_units.first);
while assigned(pu) do
begin
if (pu^.name^=s) then
break;
pu:=pused_unit(pu^.next);
end;
{ avoid uses of itself } { avoid uses of itself }
if s<>current_module^.modulename^ then if not assigned(pu) and (s<>current_module^.modulename^) then
begin begin
{ load the unit } { load the unit }
hp2:=loadunit(s,false); hp2:=loadunit(s,false);
@ -1247,7 +1256,10 @@ unit pmodules;
end. end.
{ {
$Log$ $Log$
Revision 1.101 1999-02-25 21:02:43 peter Revision 1.102 1999-03-16 21:07:25 peter
* check for dup uses
Revision 1.101 1999/02/25 21:02:43 peter
* ag386bin updates * ag386bin updates
+ coff writer + coff writer