+
+/* Arrange for the top element of the dynamic cleanup chain to be
+ popped if we exit the current binding contour. DECL is the
+ associated declaration, if any, otherwise NULL_TREE. If the
+ current contour is left via an exception, then __sjthrow will pop
+ the top element off the dynamic cleanup chain. The code that
+ avoids doing the action we push into the cleanup chain in the
+ exceptional case is contained in expand_cleanups.
+
+ This routine is only used by expand_eh_region_start, and that is
+ the only way in which an exception region should be started. This
+ routine is only used when using the setjmp/longjmp codegen method
+ for exception handling. */
+
+int
+expand_dcc_cleanup (decl)
+ tree decl;
+{
+ struct nesting *thisblock = block_stack;
+ tree cleanup;
+
+ /* Error if we are not in any block. */
+ if (thisblock == 0)
+ return 0;
+
+ /* Record the cleanup for the dynamic handler chain. */
+
+ /* All cleanups must be on the function_obstack. */
+ push_obstacks_nochange ();
+ resume_temporary_allocation ();
+ cleanup = make_node (POPDCC_EXPR);
+ pop_obstacks ();
+
+ /* Add the cleanup in a manner similar to expand_decl_cleanup. */
+ thisblock->data.block.cleanups
+ = temp_tree_cons (decl, cleanup, thisblock->data.block.cleanups);
+
+ /* If this block has a cleanup, it belongs in stack_block_stack. */
+ stack_block_stack = thisblock;
+ return 1;
+}
+
+/* Arrange for the top element of the dynamic handler chain to be
+ popped if we exit the current binding contour. DECL is the
+ assciated declaration, if any, otherwise NULL_TREE. If the current
+ contour is left via an exception, then __sjthrow will pop the top
+ element off the dynamic handler chain. The code that avoids doing
+ the action we push into the handler chain in the exceptional case
+ is contained in expand_cleanups.
+
+ This routine is only used by expand_eh_region_start, and that is
+ the only way in which an exception region should be started. This
+ routine is only used when using the setjmp/longjmp codegen method
+ for exception handling. */
+
+int
+expand_dhc_cleanup (decl)
+ tree decl;
+{
+ struct nesting *thisblock = block_stack;
+ tree cleanup;
+
+ /* Error if we are not in any block. */
+ if (thisblock == 0)
+ return 0;
+
+ /* Record the cleanup for the dynamic handler chain. */
+
+ /* All cleanups must be on the function_obstack. */
+ push_obstacks_nochange ();
+ resume_temporary_allocation ();
+ cleanup = make_node (POPDHC_EXPR);
+ pop_obstacks ();
+
+ /* Add the cleanup in a manner similar to expand_decl_cleanup. */
+ thisblock->data.block.cleanups
+ = temp_tree_cons (decl, cleanup, thisblock->data.block.cleanups);
+
+ /* If this block has a cleanup, it belongs in stack_block_stack. */
+ stack_block_stack = thisblock;
+ return 1;
+}