diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-01 22:22:57 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-01 22:22:57 +0000 |
commit | 9e169c4bf36a38689550c059570c57efbf00a6fb (patch) | |
tree | 95e6800f7ac2a49ff7f799d96f04172320e70ac0 /gcc/ada/gcc-interface/ada-tree.h | |
parent | 6170dfb6edfb7b19f8ae5209b8f948fe0076a4ad (diff) | |
download | gcc-vect256.tar.gz |
Merged trunk at revision 161680 into branch.vect256
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/vect256@161681 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/ada-tree.h')
-rw-r--r-- | gcc/ada/gcc-interface/ada-tree.h | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h index 60a5595fe22..5092ff31b78 100644 --- a/gcc/ada/gcc-interface/ada-tree.h +++ b/gcc/ada/gcc-interface/ada-tree.h @@ -32,32 +32,38 @@ union GTY((desc ("0"), desc ("tree_node_structure (&%h)"))) generic; }; -/* Ada uses the lang_decl and lang_type fields to hold a tree. */ -struct GTY(()) lang_type { tree t; }; -struct GTY(()) lang_decl { tree t; }; +/* Ada uses the lang_decl and lang_type fields to hold a tree. + + FIXME: the variable_size annotation here is needed because these types are + variable-sized in some other front-ends. Due to gengtype deficiency, the + GTY options of such types have to agree across all front-ends. */ +struct GTY((variable_size)) lang_type { tree t; }; +struct GTY((variable_size)) lang_decl { tree t; }; /* Macros to get and set the tree in TYPE_LANG_SPECIFIC. */ #define GET_TYPE_LANG_SPECIFIC(NODE) \ (TYPE_LANG_SPECIFIC (NODE) ? TYPE_LANG_SPECIFIC (NODE)->t : NULL_TREE) -#define SET_TYPE_LANG_SPECIFIC(NODE, X) \ -do { \ - tree tmp = (X); \ - if (!TYPE_LANG_SPECIFIC (NODE)) \ - TYPE_LANG_SPECIFIC (NODE) = GGC_NEW (struct lang_type); \ - TYPE_LANG_SPECIFIC (NODE)->t = tmp; \ +#define SET_TYPE_LANG_SPECIFIC(NODE, X) \ +do { \ + tree tmp = (X); \ + if (!TYPE_LANG_SPECIFIC (NODE)) \ + TYPE_LANG_SPECIFIC (NODE) \ + = ggc_alloc_lang_type (sizeof (struct lang_type)); \ + TYPE_LANG_SPECIFIC (NODE)->t = tmp; \ } while (0) /* Macros to get and set the tree in DECL_LANG_SPECIFIC. */ #define GET_DECL_LANG_SPECIFIC(NODE) \ (DECL_LANG_SPECIFIC (NODE) ? DECL_LANG_SPECIFIC (NODE)->t : NULL_TREE) -#define SET_DECL_LANG_SPECIFIC(NODE, X) \ -do { \ - tree tmp = (X); \ - if (!DECL_LANG_SPECIFIC (NODE)) \ - DECL_LANG_SPECIFIC (NODE) = GGC_NEW (struct lang_decl); \ - DECL_LANG_SPECIFIC (NODE)->t = tmp; \ +#define SET_DECL_LANG_SPECIFIC(NODE, X) \ +do { \ + tree tmp = (X); \ + if (!DECL_LANG_SPECIFIC (NODE)) \ + DECL_LANG_SPECIFIC (NODE) \ + = ggc_alloc_lang_decl (sizeof (struct lang_decl)); \ + DECL_LANG_SPECIFIC (NODE)->t = tmp; \ } while (0) |