diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-02-28 07:39:44 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-02-28 07:39:44 +0000 |
commit | 63e1b1c4b05b8f27cdbcf781294e14d3c7a73f3f (patch) | |
tree | 3e0b5a2b383f5ef72130ddb2039c242ddc5bbe56 /gcc/java/decl.c | |
parent | f472fa294971c3ab22a8c5b47dd3fde0f819fc0b (diff) | |
download | gcc-63e1b1c4b05b8f27cdbcf781294e14d3c7a73f3f.zip gcc-63e1b1c4b05b8f27cdbcf781294e14d3c7a73f3f.tar.gz gcc-63e1b1c4b05b8f27cdbcf781294e14d3c7a73f3f.tar.bz2 |
Makefile.in (integrate.o): Update.
* Makefile.in (integrate.o): Update.
* c-decl.c (copy_lang_decl): Rename.
* c-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
* integrate.c: Include langhooks.h.
(copy_decl_for_inlining): Update to use langhook.
* langhooks-def.h (lhd_do_nothing_t,
LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): New.
(LANG_HOOKS_INITIALIZER): Update.
* langhooks.c (lhd_do_nothing_t): New.
* langhooks.h (struct lang_hooks): Add dup_lang_specific_decl.
* tree.h (copy_lang_decl): Remove.
ada:
* misc.c (copy_lang_decl): Remove.
cp:
* class.c (build_clone): Update.
* cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
* cp-tree.h (cxx_dup_lang_specific_decl): New.
* lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
(copy_decl): Update.
* method.c (make_thunk): Update.
f:
* com.c (copy_lang_decl): Delete.
java:
* decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
* java-tree.h (java_dup_lang_specific_decl): New.
* lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
objc:
* objc-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
From-SVN: r50122
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r-- | gcc/java/decl.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c index f9bbc9f..eaa7c48 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -1543,13 +1543,20 @@ set_block (block) /* integrate_decl_tree calls this function. */ void -copy_lang_decl (node) +java_dup_lang_specific_decl (node) tree node; { - int lang_decl_size - = TREE_CODE (node) == VAR_DECL ? sizeof (struct lang_decl_var) - : sizeof (struct lang_decl); - struct lang_decl *x = (struct lang_decl *) ggc_alloc (lang_decl_size); + int lang_decl_size; + struct lang_decl *x; + + if (!DECL_LANG_SPECIFIC (node)) + return; + + if (TREE_CODE (node) == VAR_DECL) + lang_decl_size = sizeof (struct lang_decl_var); + else + lang_decl_size = sizeof (struct lang_decl); + x = (struct lang_decl *) ggc_alloc (lang_decl_size); memcpy (x, DECL_LANG_SPECIFIC (node), lang_decl_size); DECL_LANG_SPECIFIC (node) = x; } |