mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-20 11:59:21 +02:00
codetools: fixed TUsesGraph only parsing needed units
git-svn-id: trunk@42255 -
This commit is contained in:
parent
7e0793d348
commit
e6c9e3ce81
@ -344,8 +344,10 @@ function TUsesGraph.Parse(IgnoreErrors: boolean; out Completed: boolean;
|
||||
if UsedFiles=nil then exit;
|
||||
for i:=0 to UsedFiles.Count-1 do begin
|
||||
Filename:=UsedFiles[i];
|
||||
if not FilenameIsPascalUnit(Filename) then continue;
|
||||
// check if already used
|
||||
if CurUnit.IndexOfUses(Filename)>=0 then continue;
|
||||
if not UnitCanFindTarget(Filename) then continue;
|
||||
// add connection
|
||||
NewUnit:=GetUnit(Filename,true);
|
||||
if CurUnit.UsesUnits=nil then
|
||||
@ -357,8 +359,7 @@ function TUsesGraph.Parse(IgnoreErrors: boolean; out Completed: boolean;
|
||||
NewUnit.UsedByUnits:=TFPList.Create;
|
||||
NewUnit.UsedByUnits.Add(NewUses);
|
||||
// put new file on queue
|
||||
if UnitCanFindTarget(Filename) then
|
||||
AddStartUnit(Filename);
|
||||
AddStartUnit(Filename);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user