diff options
| author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-29 08:22:21 +0000 |
|---|---|---|
| committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-29 08:22:21 +0000 |
| commit | de46d199a6a6cfa39cad4303cc1dd349d9dbebfb (patch) | |
| tree | 223207314f829c7e3af1daa12a5580da548c52d4 /gcc | |
| parent | f0b4894020d46abdf729f2779f318d2d6b8f201f (diff) | |
| download | ppe42-gcc-de46d199a6a6cfa39cad4303cc1dd349d9dbebfb.tar.gz ppe42-gcc-de46d199a6a6cfa39cad4303cc1dd349d9dbebfb.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32799 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/cp/rtti.c | 10 | ||||
| -rw-r--r-- | gcc/except.c | 18 |
4 files changed, 31 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fceb180a7b8..f4e5f5623f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2000-03-29 Nathan Sidwell <nathan@codesourcery.com> + + * except.c (add_eh_table_entry): Mark type_info's as referenced. + 2000-03-29 Alexandre Oliva <oliva@lsd.ic.unicamp.br> * config/rs6000/aix41.h (CPP_SPEC): Define _ANSI_C_SOURCE if -ansi diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e92612d2358..2faca96ac39 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2000-03-29 Nathan Sidwell <nathan@codesourcery.com> + + * 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. + 2000-03-28 Mark Mitchell <mark@codesourcery.com> * class.c: Reorganize to put virtual function table initialization diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index ea217560296..13f5b095010 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)); diff --git a/gcc/except.c b/gcc/except.c index 2d7114ae11b..67bbc40c272 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2162,6 +2162,24 @@ add_eh_table_entry (n) } } eh_table[eh_table_size++] = n; + + if (flag_new_exceptions) + { + /* We will output the exception table late in the compilation. That + references type_info objects which should have already been output + by that time. We explicitly mark those objects as being + referenced now so we know to emit them. */ + struct handler_info *handler = get_first_handler (n); + + for (; handler; handler = handler->next) + if (handler->type_info && handler->type_info != CATCH_ALL_TYPE) + { + tree tinfo = (tree)handler->type_info; + + tinfo = TREE_OPERAND (tinfo, 0); + TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (tinfo)) = 1; + } + } #endif } |

