From dc25e6935c22e8f47464003b2c4b9fd78595202a Mon Sep 17 00:00:00 2001 From: law Date: Fri, 28 Nov 1997 03:23:04 +0000 Subject: [PATCH] * except.c: Call terminate without caching so many bits. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/egcs_1_00_branch@16813 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 2 ++ gcc/cp/except.c | 16 +++------------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 00761798f1d..5275663fe15 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ Thu Nov 27 09:39:31 1997 Jason Merrill + * except.c: Call terminate without caching so many bits. + * class.c: Remove static pending_hard_virtuals. (add_virtual_function): Take pointers to pending_virtuals and pending_hard_virtuals. diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 91b1cdea7c6..bad75bd5e28 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -177,9 +177,6 @@ static tree FirstExceptionMatch; /* Used to cache a call to __unwind_function. */ static tree Unwind; -/* Holds a ready to emit call to "terminate". */ -static tree TerminateFunctionCall; - /* ====================================================================== */ @@ -282,7 +279,7 @@ init_exception_processing () NOT_BUILT_IN, NULL_PTR); Unexpected = default_conversion (unexpected_fndecl); - Terminate = default_conversion (terminate_fndecl); + Terminate = terminate_fndecl; SetTerminate = default_conversion (set_terminate_fndecl); SetUnexpected = default_conversion (set_unexpected_fndecl); CatchMatch = default_conversion (catch_match_fndecl); @@ -290,8 +287,6 @@ init_exception_processing () Unwind = default_conversion (unwind_fndecl); BuiltinReturnAddress = default_conversion (builtin_return_address_fndecl); - TerminateFunctionCall = build_function_call (Terminate, NULL_TREE); - pop_lang_context (); d = build_decl (VAR_DECL, get_identifier ("__eh_pc"), ptr_type_node); @@ -655,7 +650,7 @@ expand_start_catch_block (declspecs, declarator) init = ocp_convert (TREE_TYPE (decl), init, CONV_IMPLICIT|CONV_FORCE_TEMP, 0); init = build (TRY_CATCH_EXPR, TREE_TYPE (init), init, - TerminateFunctionCall); + build_function_call (Terminate, NULL_TREE)); } /* Let `cp_finish_decl' know that this initializer is ok. */ @@ -995,7 +990,6 @@ expand_builtin_throw () /* no it didn't --> therefore we need to call terminate */ emit_label (gotta_call_terminate); do_function_call (Terminate, NULL_TREE, NULL_TREE); - assemble_external (TREE_OPERAND (Terminate, 0)); { rtx ret_val, x; @@ -1072,7 +1066,6 @@ expand_end_eh_spec (raises) emit_label (cont); jumpif (make_tree (integer_type_node, flag), end); do_function_call (Terminate, NULL_TREE, NULL_TREE); - assemble_external (TREE_OPERAND (Terminate, 0)); emit_barrier (); do_pending_stack_adjust (); RTL_EXPR_SEQUENCE (expr) = get_insns (); @@ -1178,9 +1171,6 @@ expand_exception_blocks () the setjmp/longjmp approach. */ if (exceptions_via_longjmp == 0) { - /* Is this necessary? */ - assemble_external (TREE_OPERAND (Terminate, 0)); - expand_eh_region_start (); } @@ -1188,7 +1178,7 @@ expand_exception_blocks () catch_clauses = NULL_RTX; if (exceptions_via_longjmp == 0) - expand_eh_region_end (TerminateFunctionCall); + expand_eh_region_end (build_function_call (Terminate, NULL_TREE)); expand_leftover_cleanups (); -- 2.11.4.GIT