* Save/restore high-level code generator when processing exception filters, fixes building in Win64 with -dTEST_WIN64_SEH, Mantis #21879.

git-svn-id: trunk@21110 -
This commit is contained in:
sergei 2012-04-29 07:35:19 +00:00
parent 6850653296
commit a85bb08a74

View File

@ -913,6 +913,7 @@ implementation
procedure tcgprocinfo.generate_exceptfilter(nestedpi: tcgprocinfo);
var
saved_cg: tcg;
saved_hlcg: thlcgobj;
begin
if nestedpi.procdef.proctypeoption<>potype_exceptfilter then
InternalError(201201141);
@ -920,11 +921,14 @@ implementation
aktproccode.concatlist(current_asmdata.CurrAsmList);
{ save the codegen }
saved_cg:=cg;
saved_hlcg:=hlcg;
cg:=nil;
hlcg:=nil;
nestedpi.generate_code;
{ prevents generating code the second time when processing nested procedures }
nestedpi.resetprocdef;
cg:=saved_cg;
hlcg:=saved_hlcg;
add_reg_instruction_hook:=@cg.add_reg_instruction;
end;