+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
#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
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);
- }
-}