summaryrefslogtreecommitdiffstats
path: root/gcc/except.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-10 00:09:09 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-10 00:09:09 +0000
commit3b919cde4569b2bf5a25581d1287776ab31932c1 (patch)
treecba6b64d335d02237dcc6038991bbae04157ad36 /gcc/except.c
parent983ce84055ab7323a20f7b217f929e8a6d97c8dc (diff)
downloadppe42-gcc-3b919cde4569b2bf5a25581d1287776ab31932c1.tar.gz
ppe42-gcc-3b919cde4569b2bf5a25581d1287776ab31932c1.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71254 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/except.c b/gcc/except.c
index 97e0cb2b2b9..f275866aa6f 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -73,6 +73,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "tm_p.h"
#include "target.h"
#include "langhooks.h"
+#include "cgraph.h"
/* Provide defaults for stuff that may not be defined when using
sjlj exceptions. */
@@ -3704,11 +3705,25 @@ output_function_exception_table (void)
rtx value;
if (type == NULL_TREE)
- type = integer_zero_node;
+ value = const0_rtx;
else
- type = lookup_type_for_runtime (type);
+ {
+ struct cgraph_varpool_node *node;
+
+ type = lookup_type_for_runtime (type);
+ value = expand_expr (type, NULL_RTX, VOIDmode, EXPAND_INITIALIZER);
+
+ /* Let cgraph know that the rtti decl is used. Not all of the
+ paths below go through assemble_integer, which would take
+ care of this for us. */
+ if (TREE_CODE (type) != ADDR_EXPR)
+ abort ();
+ type = TREE_OPERAND (type, 0);
+ node = cgraph_varpool_node (type);
+ if (node)
+ cgraph_varpool_mark_needed_node (node);
+ }
- value = expand_expr (type, NULL_RTX, VOIDmode, EXPAND_INITIALIZER);
if (tt_format == DW_EH_PE_absptr || tt_format == DW_EH_PE_aligned)
assemble_integer (value, tt_format_size,
tt_format_size * BITS_PER_UNIT, 1);
OpenPOWER on IntegriCloud