mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 18:09:30 +02:00
Destroy tfornode class loopiteration field if assigned
git-svn-id: trunk@49329 -
This commit is contained in:
parent
1e1848da92
commit
39896a1b11
@ -111,6 +111,7 @@ interface
|
||||
loopiteration : tnode;
|
||||
loopvar_notid:cardinal;
|
||||
constructor create(l,r,_t1,_t2 : tnode;back : boolean);virtual;reintroduce;
|
||||
destructor destroy;override;
|
||||
function pass_typecheck:tnode;override;
|
||||
function pass_1 : tnode;override;
|
||||
function makewhileloop : tnode;
|
||||
@ -1774,6 +1775,13 @@ implementation
|
||||
include(loopflags,lnf_testatbegin);
|
||||
end;
|
||||
|
||||
destructor tfornode.destroy;
|
||||
begin
|
||||
if assigned(loopiteration) then
|
||||
loopiteration.destroy;
|
||||
inherited destroy;
|
||||
end;
|
||||
|
||||
function tfornode.simplify(forinline : boolean) : tnode;
|
||||
begin
|
||||
result:=nil;
|
||||
|
Loading…
Reference in New Issue
Block a user