aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-03-29 08:22:21 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-03-29 08:22:21 +0000
commit8a4451aa8d563a9b3ac4dd8c7071ac84e78eda18 (patch)
tree223207314f829c7e3af1daa12a5580da548c52d4 /gcc/cp/rtti.c
parentca36f0577c014e672984e6185352ee028dd3b1f6 (diff)
downloadgcc-8a4451aa8d563a9b3ac4dd8c7071ac84e78eda18.zip
gcc-8a4451aa8d563a9b3ac4dd8c7071ac84e78eda18.tar.gz
gcc-8a4451aa8d563a9b3ac4dd8c7071ac84e78eda18.tar.bz2
except.c (add_eh_table_entry): Mark type_info's as referenced.
gcc: * except.c (add_eh_table_entry): Mark type_info's as referenced. gcc/cp: * rtti.c (get_tinfo_decl): Mark used. (emit_tinfo_decl): Don't optimize polymorphic type_info. Only mark as dealt with, if we output it. From-SVN: r32799
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index ea21756..13f5b09 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -435,6 +435,7 @@ get_tinfo_decl (type)
pushdecl_top_level (d);
/* Remember the type it is for. */
TREE_TYPE (name) = type;
+ TREE_USED (name) = 1;
}
return d;
}
@@ -1933,16 +1934,11 @@ emit_tinfo_decl (decl_ptr, data)
tinfo_type = TREE_TYPE (DECL_NAME (tinfo_decl));
my_friendly_assert (tinfo_type != NULL_TREE, 20000120);
+ if (!DECL_NEEDED_P (tinfo_decl))
+ return 0;
/* Say we've dealt with it. */
TREE_TYPE (DECL_NAME (tinfo_decl)) = NULL_TREE;
- if (!DECL_NEEDED_P (tinfo_decl))
- return 0;
- if (TREE_CODE (tinfo_type) == RECORD_TYPE && TYPE_POLYMORPHIC_P (tinfo_type)
- && !CLASSTYPE_VTABLE_NEEDS_WRITING (tinfo_type))
- /* A polymorphic type only needs its type_info emitted when the vtable
- is. */
- return 0;
create_tinfo_types ();
decl = synthesize_tinfo_var (tinfo_type, DECL_ASSEMBLER_NAME (tinfo_decl));