summaryrefslogtreecommitdiffstats
path: root/gcc/cp/cp-lang.c
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-30 23:53:32 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-30 23:53:32 +0000
commit05f9ea7878537209afd40457b960a22f079d549f (patch)
treeea6af9f1714899b3e6bb97969fabd46262b40f7e /gcc/cp/cp-lang.c
parent20783f07af76e1535a7405994814b4c9672e2561 (diff)
downloadppe42-gcc-05f9ea7878537209afd40457b960a22f079d549f.tar.gz
ppe42-gcc-05f9ea7878537209afd40457b960a22f079d549f.zip
ChangeLog:
* c-decl.c (c_expand_body_1): Remove and fold back into ... (c_expand_body): here. (c_expand_decl): Move to ... * c-common.c (c_expand_decl): Here and remove check for nested functions. * c-common.h (c_expand_decl): Add prototype. * c-tree.h (c_expand_decl): Remove. cp/ChangeLog: * cp-lang.c (cp_expand_decl): Remove. (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82469 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-lang.c')
-rw-r--r--gcc/cp/cp-lang.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c
index 3d737ad502a..8a82e4e72ce 100644
--- a/gcc/cp/cp-lang.c
+++ b/gcc/cp/cp-lang.c
@@ -40,7 +40,6 @@ static tree cp_expr_size (tree);
static size_t cp_tree_size (enum tree_code);
static bool cp_var_mod_type_p (tree);
static int cxx_types_compatible_p (tree, tree);
-static int cp_expand_decl (tree);
static void cxx_initialize_diagnostics (diagnostic_context *);
#undef LANG_HOOKS_NAME
@@ -72,7 +71,7 @@ static void cxx_initialize_diagnostics (diagnostic_context *);
#undef LANG_HOOKS_EXPAND_EXPR
#define LANG_HOOKS_EXPAND_EXPR cxx_expand_expr
#undef LANG_HOOKS_EXPAND_DECL
-#define LANG_HOOKS_EXPAND_DECL cp_expand_decl
+#define LANG_HOOKS_EXPAND_DECL c_expand_decl
#undef LANG_HOOKS_SAFE_FROM_P
#define LANG_HOOKS_SAFE_FROM_P c_safe_from_p
#undef LANG_HOOKS_PARSE_FILE
@@ -293,29 +292,6 @@ cp_expr_size (tree exp)
return lhd_expr_size (exp);
}
-/* Expand DECL if it declares an entity not handled by the
- common code. */
-
-static int
-cp_expand_decl (tree decl)
-{
- if (TREE_CODE (decl) == VAR_DECL && !TREE_STATIC (decl))
- {
- /* Let the back-end know about this variable. */
- if (!anon_aggr_type_p (TREE_TYPE (decl)))
- emit_local_var (decl);
- else
- expand_anon_union_decl (decl, NULL_TREE,
- DECL_ANON_UNION_ELEMS (decl));
- }
- else if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl))
- make_rtl_for_local_static (decl);
- else
- return 0;
-
- return 1;
-}
-
int
cp_tree_chain_matters_p (tree t)
{
OpenPOWER on IntegriCloud