Commit 3459ca23 by Ollie Wild Committed by Ollie Wild

expr.c (cxx_expand_expr): Removed.

	gcc/cp/
	* expr.c (cxx_expand_expr): Removed.
	* cp-tree.h (exx_expand_expr): Removed.
	* cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
	with c_expand_expr.

From-SVN: r129645
parent eb80272a
2007-10-26 Ollie Wild <aaw@google.com>
* expr.c (cxx_expand_expr): Removed.
* cp-tree.h (exx_expand_expr): Removed.
* cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
with c_expand_expr.
2007-10-25 Paolo Carlini <pcarlini@suse.de>
PR c++/33843
......
......@@ -51,7 +51,7 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set
#undef LANG_HOOKS_EXPAND_EXPR
#define LANG_HOOKS_EXPAND_EXPR cxx_expand_expr
#define LANG_HOOKS_EXPAND_EXPR c_expand_expr
#undef LANG_HOOKS_EXPAND_DECL
#define LANG_HOOKS_EXPAND_DECL c_expand_decl
#undef LANG_HOOKS_PARSE_FILE
......
......@@ -4332,9 +4332,6 @@ extern void choose_personality_routine (enum languages);
extern tree eh_type_info (tree);
/* in expr.c */
extern rtx cxx_expand_expr (tree, rtx,
enum machine_mode,
int, rtx *);
extern tree cplus_expand_constant (tree);
/* friend.c */
......
......@@ -82,46 +82,3 @@ cplus_expand_constant (tree cst)
return cst;
}
/* Hook used by expand_expr to expand language-specific tree codes. */
/* ??? The only thing that should be here are things needed to expand
constant initializers; everything else should be handled by the
gimplification routines. Are EMPTY_CLASS_EXPR or BASELINK needed? */
rtx
cxx_expand_expr (tree exp, rtx target, enum machine_mode tmode, int modifier,
rtx *alt_rtl)
{
tree type = TREE_TYPE (exp);
enum machine_mode mode = TYPE_MODE (type);
enum tree_code code = TREE_CODE (exp);
/* No sense saving up arithmetic to be done
if it's all in the wrong mode to form part of an address.
And force_operand won't know whether to sign-extend or zero-extend. */
if (mode != Pmode && modifier == EXPAND_SUM)
modifier = EXPAND_NORMAL;
switch (code)
{
case PTRMEM_CST:
return expand_expr (cplus_expand_constant (exp),
target, tmode, modifier);
case OFFSET_REF:
/* Offset refs should not make it through to here. */
gcc_unreachable ();
case EMPTY_CLASS_EXPR:
/* We don't need to generate any code for an empty class. */
return const0_rtx;
case BASELINK:
return expand_expr (BASELINK_FUNCTIONS (exp), target, tmode,
modifier);
default:
return c_expand_expr (exp, target, tmode, modifier, alt_rtl);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment