* correctly set the line info for the implicitly generated entry code nodes,

and update the code to also set it for some implicitly generated exit code

git-svn-id: trunk@34393 -
This commit is contained in:
Jonas Maebe 2016-08-29 16:05:25 +00:00
parent ffd4870a60
commit eb2ce85269

View File

@ -872,6 +872,7 @@ implementation
{ Generate procedure by combining init+body+final,
depending on the implicit finally we need to add
an try...finally...end wrapper }
current_filepos:=entrypos;
newblock:=internalstatements(newstatement);
{ initialization is common for all cases }
addstatement(newstatement,loadpara_asmnode);
@ -925,7 +926,9 @@ implementation
have managed variables/temps }
maybe_add_constructor_wrapper(code,
cs_implicit_exceptions in current_settings.moduleswitches);
current_filepos:=entrypos;
addstatement(newstatement,code);
current_filepos:=exitpos;
if assigned(nestedexitlabel) then
addstatement(newstatement,clabelnode.create(cnothingnode.create,nestedexitlabel));
addstatement(newstatement,exitlabel_asmnode);
@ -938,7 +941,10 @@ implementation
end;
end;
if not final_used then
cnodeutils.procdef_block_add_implicit_finalize_nodes(procdef,newstatement);
begin
current_filepos:=exitpos;
cnodeutils.procdef_block_add_implicit_finalize_nodes(procdef,newstatement);
end;
do_firstpass(newblock);
code:=newblock;
current_filepos:=oldfilepos;