diff options
author | Richard Henderson <rth@redhat.com> | 2003-09-09 17:09:09 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-09-09 17:09:09 -0700 |
commit | dd07abd7259e11e6e7a9e6e91d100e9c8743273a (patch) | |
tree | cba6b64d335d02237dcc6038991bbae04157ad36 /gcc/cp | |
parent | 7f5cc0f3d0f719d5ecf4ad0e368a4449a3cd9e00 (diff) | |
download | gcc-dd07abd7259e11e6e7a9e6e91d100e9c8743273a.zip gcc-dd07abd7259e11e6e7a9e6e91d100e9c8743273a.tar.gz gcc-dd07abd7259e11e6e7a9e6e91d100e9c8743273a.tar.bz2 |
except.c: Include cgraph.h.
* except.c: Include cgraph.h.
(output_function_exception_table): Invoke
cgraph_varpool_mark_needed_node.
* Makefile.in (except.o): Update.
* decl2.c (mark_member_pointers): Rename from
mark_member_pointers_and_eh_handlers and don't check eh handlers.
From-SVN: r71254
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 48 |
2 files changed, 16 insertions, 37 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0441695..8af1491 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2003-09-09 Richard Henderson <rth@redhat.com> + + * decl2.c (mark_member_pointers): Rename from + mark_member_pointers_and_eh_handlers and don't check eh handlers. + 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de> PR bootstrap/12168 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 4004c8c..cbf074f 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2560,49 +2560,24 @@ generate_ctor_and_dtor_functions_for_priority (splay_tree_node n, void * data) /* Callgraph code does not understand the member pointers. Mark the methods referenced as used. */ static tree -mark_member_pointers_and_eh_handlers (tree *tp, - int *walk_subtrees, - void *data ATTRIBUTE_UNUSED) +mark_member_pointers (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) { - /* Avoid useless walking of complex type and declaration nodes. */ - if (TYPE_P (*tp) || DECL_P (*tp)) - { - *walk_subtrees = 0; - return 0; - } - switch (TREE_CODE (*tp)) + tree t = *tp; + + switch (TREE_CODE (t)) { case PTRMEM_CST: - if (TYPE_PTRMEMFUNC_P (TREE_TYPE (*tp))) - cgraph_mark_needed_node (cgraph_node (PTRMEM_CST_MEMBER (*tp))); - break; - - /* EH handlers will emit EH tables referencing typeinfo. */ - case HANDLER: - if (HANDLER_TYPE (*tp)) - { - tree tinfo = eh_type_info (HANDLER_TYPE (*tp)); - - cgraph_varpool_mark_needed_node (cgraph_varpool_node (tinfo)); - } + if (TYPE_PTRMEMFUNC_P (TREE_TYPE (t))) + cgraph_mark_needed_node (cgraph_node (PTRMEM_CST_MEMBER (t))); break; - case EH_SPEC_BLOCK: - { - tree type; - - for (type = EH_SPEC_RAISES ((*tp)); type; - type = TREE_CHAIN (type)) - { - tree tinfo = eh_type_info (TREE_VALUE (type)); - - cgraph_varpool_mark_needed_node (cgraph_varpool_node (tinfo)); - } - } - break; default: + /* Avoid useless walking of complex type and declaration nodes. */ + if (TYPE_P (t) || DECL_P (t)) + *walk_subtrees = 0; break; } + return 0; } @@ -2612,8 +2587,7 @@ void lower_function (tree fn) { walk_tree_without_duplicates (&DECL_SAVED_TREE (fn), - mark_member_pointers_and_eh_handlers, - NULL); + mark_member_pointers, NULL); } /* This routine is called from the last rule in yyparse (). |