mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 04:49:20 +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;
|
loopiteration : tnode;
|
||||||
loopvar_notid:cardinal;
|
loopvar_notid:cardinal;
|
||||||
constructor create(l,r,_t1,_t2 : tnode;back : boolean);virtual;reintroduce;
|
constructor create(l,r,_t1,_t2 : tnode;back : boolean);virtual;reintroduce;
|
||||||
|
destructor destroy;override;
|
||||||
function pass_typecheck:tnode;override;
|
function pass_typecheck:tnode;override;
|
||||||
function pass_1 : tnode;override;
|
function pass_1 : tnode;override;
|
||||||
function makewhileloop : tnode;
|
function makewhileloop : tnode;
|
||||||
@ -1774,6 +1775,13 @@ implementation
|
|||||||
include(loopflags,lnf_testatbegin);
|
include(loopflags,lnf_testatbegin);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
destructor tfornode.destroy;
|
||||||
|
begin
|
||||||
|
if assigned(loopiteration) then
|
||||||
|
loopiteration.destroy;
|
||||||
|
inherited destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
function tfornode.simplify(forinline : boolean) : tnode;
|
function tfornode.simplify(forinline : boolean) : tnode;
|
||||||
begin
|
begin
|
||||||
result:=nil;
|
result:=nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user