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
This commit is contained in:
parent
7f5cc0f3d0
commit
dd07abd725
@ -1,3 +1,10 @@
|
||||
2003-09-09 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* except.c: Include cgraph.h.
|
||||
(output_function_exception_table): Invoke
|
||||
cgraph_varpool_mark_needed_node.
|
||||
* Makefile.in (except.o): Update.
|
||||
|
||||
2003-09-07 Kelley Cook <kelleycook@wideopenwest.com>
|
||||
|
||||
* Makefile.in: Define REMAKEFLAGS for LANGUAGES & BOOT_CFLAGS
|
||||
|
@ -1535,11 +1535,11 @@ stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) f
|
||||
function.h insn-config.h hard-reg-set.h $(EXPR_H) libfuncs.h except.h \
|
||||
$(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H) \
|
||||
langhooks.h $(PREDICT_H) gt-stmt.h $(OPTABS_H) $(TARGET_H)
|
||||
except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
||||
flags.h except.h function.h $(EXPR_H) libfuncs.h $(INTEGRATE_H) langhooks.h \
|
||||
insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \
|
||||
except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||||
$(TREE_H) flags.h except.h function.h $(EXPR_H) libfuncs.h $(INTEGRATE_H) \
|
||||
langhooks.h insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \
|
||||
dwarf2asm.h dwarf2out.h toplev.h $(HASHTAB_H) intl.h $(GGC_H) \
|
||||
gt-except.h
|
||||
gt-except.h cgraph.h
|
||||
expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) flags.h \
|
||||
function.h $(REGS_H) $(EXPR_H) $(OPTABS_H) libfuncs.h $(INSN_ATTR_H) insn-config.h \
|
||||
$(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
|
||||
|
@ -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
|
||||
|
@ -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)));
|
||||
if (TYPE_PTRMEMFUNC_P (TREE_TYPE (t)))
|
||||
cgraph_mark_needed_node (cgraph_node (PTRMEM_CST_MEMBER (t)));
|
||||
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));
|
||||
}
|
||||
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 ().
|
||||
|
21
gcc/except.c
21
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);
|
||||
|
Loading…
Reference in New Issue
Block a user