]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* except.c: Call terminate without caching so many bits.
authorJason Merrill <jason@yorick.cygnus.com>
Fri, 28 Nov 1997 03:23:04 +0000 (03:23 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 28 Nov 1997 03:23:04 +0000 (20:23 -0700)
From-SVN: r16813

gcc/cp/ChangeLog
gcc/cp/except.c

index 00761798f1dc47f063934979f8fa9c0228c5db06..5275663fe1533f6a9c1160c5674aa14e42219fab 100644 (file)
@@ -1,5 +1,7 @@
 Thu Nov 27 09:39:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
+       * 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.
index 91b1cdea7c6eb4aa343ea470d98bb6440fa278bf..bad75bd5e28a7bce4e12cbade4826d734b9b85ed 100644 (file)
@@ -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 ();