+2013-08-29 Jan Hubicka <jh@suse.cz>
+
+ Correct previous patch to not mark terminate as LEAF.
+ * class.c (build_vtbl_initializer): Drop LEAF
+ * decl.c (cxx_init_decl_processing): Likewise.
+ (push_throw_library_fn): Likewise.
+ * except.c (init_exception_processing): Likewise.
+ (do_begin_catch): Likewise.
+ (do_end_catch): Likewise.
+ (do_allocate_exception): Likewise.
+
2013-08-29 Jan Hubicka <jh@suse.cz>
* class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
if (!get_global_value_if_present (fn, &fn))
fn = push_library_fn (fn, (build_function_type_list
(void_type_node, NULL_TREE)),
- NULL_TREE, ECF_NORETURN | ECF_LEAF);
+ NULL_TREE, ECF_NORETURN);
if (!TARGET_VTABLE_USES_DESCRIPTORS)
init = fold_convert (vfunc_ptr_type_node,
build_fold_addr_expr (fn));
abort_fndecl
= build_library_fn_ptr ("__cxa_pure_virtual", void_ftype,
- ECF_NORETURN | ECF_NOTHROW | ECF_LEAF);
+ ECF_NORETURN | ECF_NOTHROW);
/* Perform other language dependent initializations. */
init_class_processing ();
tree
push_throw_library_fn (tree name, tree type)
{
- tree fn = push_library_fn (name, type, NULL_TREE, ECF_NORETURN | ECF_LEAF);
+ tree fn = push_library_fn (name, type, NULL_TREE, ECF_NORETURN);
return fn;
}
\f
push_namespace (std_identifier);
tmp = build_function_type_list (void_type_node, NULL_TREE);
terminate_node = build_cp_library_fn_ptr ("terminate", tmp,
- ECF_NOTHROW | ECF_NORETURN
- | ECF_LEAF);
+ ECF_NOTHROW | ECF_NORETURN);
TREE_THIS_VOLATILE (terminate_node) = 1;
TREE_NOTHROW (terminate_node) = 1;
pop_namespace ();
if (!get_global_value_if_present (fn, &fn))
{
/* Declare void* __cxa_begin_catch (void *) throw(). */
- fn = declare_library_fn (fn, ptr_type_node, ptr_type_node,
- ECF_NOTHROW | ECF_LEAF);
+ fn = declare_library_fn (fn, ptr_type_node, ptr_type_node, ECF_NOTHROW);
/* Create its transactional-memory equivalent. */
if (flag_tm)
tree fn2 = get_identifier ("_ITM_cxa_begin_catch");
if (!get_global_value_if_present (fn2, &fn2))
fn2 = declare_library_fn (fn2, ptr_type_node,
- ptr_type_node,
- ECF_NOTHROW | ECF_TM_PURE | ECF_LEAF);
+ ptr_type_node, ECF_NOTHROW | ECF_TM_PURE);
record_tm_replacement (fn, fn2);
}
}
{
/* Declare void __cxa_end_catch ().
This can throw if the destructor for the exception throws. */
- fn = push_void_library_fn (fn, void_list_node, ECF_LEAF);
+ fn = push_void_library_fn (fn, void_list_node, 0);
/* Create its transactional-memory equivalent. */
if (flag_tm)
{
tree fn2 = get_identifier ("_ITM_cxa_end_catch");
if (!get_global_value_if_present (fn2, &fn2))
- fn2 = push_void_library_fn (fn2, void_list_node,
- ECF_TM_PURE | ECF_LEAF);
+ fn2 = push_void_library_fn (fn2, void_list_node, ECF_TM_PURE);
record_tm_replacement (fn, fn2);
}
}
{
/* Declare void *__cxa_allocate_exception(size_t) throw(). */
fn = declare_library_fn (fn, ptr_type_node, size_type_node,
- ECF_NOTHROW | ECF_MALLOC | ECF_LEAF);
+ ECF_NOTHROW | ECF_MALLOC);
if (flag_tm)
{
if (!get_global_value_if_present (fn2, &fn2))
fn2 = declare_library_fn (fn2, ptr_type_node,
size_type_node,
- ECF_NOTHROW | ECF_MALLOC | ECF_TM_PURE
- | ECF_LEAF);
+ ECF_NOTHROW | ECF_MALLOC | ECF_TM_PURE);
record_tm_replacement (fn, fn2);
}
}