diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2004-05-30 23:53:32 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2004-05-30 16:53:32 -0700 |
commit | 3c79fa86db0cf6bbcc3673c2844e85ca8679370c (patch) | |
tree | ea6af9f1714899b3e6bb97969fabd46262b40f7e /gcc/c-common.c | |
parent | 1b0f3e79b1b3b9e96be90ec30fc6a142057e84ed (diff) | |
download | gcc-3c79fa86db0cf6bbcc3673c2844e85ca8679370c.zip gcc-3c79fa86db0cf6bbcc3673c2844e85ca8679370c.tar.gz gcc-3c79fa86db0cf6bbcc3673c2844e85ca8679370c.tar.bz2 |
c-decl.c (c_expand_body_1): Remove and fold back into ...
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.
From-SVN: r82469
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 666dc40..4b2b355 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -1123,6 +1123,30 @@ fname_as_string (int pretty_p) return namep; } +/* Expand DECL if it declares an entity not handled by the + common code. */ + +int +c_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; +} + + /* Return the VAR_DECL for a const char array naming the current function. If the VAR_DECL has not yet been created, create it now. RID indicates how it should be formatted and IDENTIFIER_NODE |