mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 18:09:12 +02:00
* only make a copy of the finally code in pass_1 instead of in pass_typecheck,
to avoid an internalerror in case the finally code contains a goto outside the finally code (tbf/tb0209.pp) git-svn-id: branches/debug_eh@41209 -
This commit is contained in:
parent
d93c05a90c
commit
7aa6a2ec81
@ -60,7 +60,7 @@ interface
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
tllvmtryfinallynode = class(tcgtryfinallynode)
|
tllvmtryfinallynode = class(tcgtryfinallynode)
|
||||||
function pass_typecheck: tnode; override;
|
function pass_1: tnode; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
tllvmraisenode = class(tcgraisenode)
|
tllvmraisenode = class(tcgraisenode)
|
||||||
@ -104,7 +104,7 @@ implementation
|
|||||||
tllvmtryfinallynode
|
tllvmtryfinallynode
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
function tllvmtryfinallynode.pass_typecheck: tnode;
|
function tllvmtryfinallynode.pass_1: tnode;
|
||||||
begin
|
begin
|
||||||
{ make a copy of the "finally" code for the "no exception happened"
|
{ make a copy of the "finally" code for the "no exception happened"
|
||||||
case }
|
case }
|
||||||
@ -267,8 +267,8 @@ implementation
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
{ Need a begin_catch so that the reraise will know what exception to throw.
|
{ Need a begin_catch so that the reraise will know what exception to throw.
|
||||||
Don't need to add a "catch all" to the landing pad, as it contains one
|
Don't need to add a "catch all" to the landing pad, as it contains one.
|
||||||
we want to rethrow whatever exception was caught rather than guarantee
|
We want to rethrow whatever exception was caught rather than guarantee
|
||||||
that all possible kinds of exceptions get caught. }
|
that all possible kinds of exceptions get caught. }
|
||||||
catch_all_start_internal(list,false);
|
catch_all_start_internal(list,false);
|
||||||
hlcg.g_call_system_proc(list,'fpc_reraise',[],nil).resetiftemp;
|
hlcg.g_call_system_proc(list,'fpc_reraise',[],nil).resetiftemp;
|
||||||
|
Loading…
Reference in New Issue
Block a user