summaryrefslogtreecommitdiff
path: root/gnu/egcs/gcc/cp/rtti.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2000-06-05 22:18:08 +0000
committerMarc Espie <espie@cvs.openbsd.org>2000-06-05 22:18:08 +0000
commit1cc0c12429e74c09f75c778f6ab729133f4f7115 (patch)
tree4f6e375a31fb41e453f75cdb7b730ec068b8dbda /gnu/egcs/gcc/cp/rtti.c
parentcb93c551e9ce9846b9f004a0eed7991d15b8b260 (diff)
Synch with 2.95.3 (pre-rel)
Diffstat (limited to 'gnu/egcs/gcc/cp/rtti.c')
-rw-r--r--gnu/egcs/gcc/cp/rtti.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/gnu/egcs/gcc/cp/rtti.c b/gnu/egcs/gcc/cp/rtti.c
index e0ce5cd8666..c8c1ba95255 100644
--- a/gnu/egcs/gcc/cp/rtti.c
+++ b/gnu/egcs/gcc/cp/rtti.c
@@ -363,8 +363,19 @@ get_tinfo_var (type)
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;
@@ -393,13 +404,23 @@ get_tinfo_fn (type)
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;