OSDN Git Service

gcc/cp/
authoraaw <aaw@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 26 Oct 2007 08:19:14 +0000 (08:19 +0000)
committeraaw <aaw@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 26 Oct 2007 08:19:14 +0000 (08:19 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129645 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.h
gcc/cp/cp-tree.h
gcc/cp/expr.c

index 94fe906..b4edd88 100644 (file)
@@ -1,3 +1,10 @@
+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
index 60d7818..8fc6987 100644 (file)
@@ -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
index c0f3bf0..bb02692 100644 (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 */
index b518646..feafd70 100644 (file)
@@ -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);
-    }
-}