* exception.cc (__cp_pop_exception): Cleanup the original object.
* rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
* class.c (set_rtti_entry): Use it.
From-SVN: r33271
+2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
+
+ * exception.cc (__cp_pop_exception): Cleanup the original object.
+
+1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
+
+ * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
+ * class.c (set_rtti_entry): Use it.
+
Wed Apr 12 00:45:49 2000 Jeffrey A Law (law@cygnus.com)
2000-02-03 <loewis@informatik.hu-berlin.de>
return;
if (flag_rtti)
- vfn = build1 (ADDR_EXPR, vfunc_ptr_type_node, get_tinfo_fn (type));
+ vfn = build1 (ADDR_EXPR, vfunc_ptr_type_node, get_tinfo_fn_unused (type));
else
vfn = build1 (NOP_EXPR, vfunc_ptr_type_node, size_zero_node);
TREE_CONSTANT (vfn) = 1;
extern tree build_typeid PROTO((tree));
extern tree build_x_typeid PROTO((tree));
extern tree get_tinfo_fn PROTO((tree));
+extern tree get_tinfo_fn_unused PROTO((tree));
extern tree get_typeid PROTO((tree));
extern tree get_typeid_1 PROTO((tree));
extern tree build_dynamic_cast PROTO((tree, tree));
if (p->cleanup)
/* 2 is a magic value for destructors; see build_delete(). */
- p->cleanup (p->value, 2);
+ p->cleanup (p->original_value, 2); // value may have been adjusted.
if (! __is_pointer (p->type))
- __eh_free (p->original_value); // value may have been co-erced.
+ __eh_free (p->original_value); // value may have been adjusted.
__eh_free (p);
}
return tdecl;
}
+/* Returns the decl for a function which will return a type_info node for
+ TYPE. This version does not mark the function used, for use in
+ set_rtti_entry; for the vtable case, we'll get marked in
+ finish_vtable_vardecl, when we know that we want to be emitted.
+
+ We do this to avoid emitting the tinfo node itself, since we don't
+ currently support DECL_DEFER_OUTPUT for variables. Also, we don't
+ associate constant pools with their functions properly, so we would
+ emit string constants and such even though we don't emit the actual
+ function. When those bugs are fixed, this function should go away. */
+
tree
-get_tinfo_fn (type)
+get_tinfo_fn_unused (type)
tree type;
{
tree name;
pushdecl_top_level (d);
make_function_rtl (d);
- mark_used (d);
mark_inline_for_output (d);
pop_obstacks ();
return d;
}
+/* Likewise, but also mark it used. Called by various EH and RTTI code. */
+
+tree
+get_tinfo_fn (type)
+ tree type;
+{
+ tree d = get_tinfo_fn_unused (type);
+ mark_used (d);
+ return d;
+}
+
tree
get_typeid_1 (type)
tree type;