diff options
author | Franz Sirl <Franz.Sirl-kernel@lauterbach.com> | 1999-10-08 05:48:29 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-10-08 05:48:29 +0000 |
commit | 0f4fd75d9a8c1b923d996e05c0ae4f048c1cc795 (patch) | |
tree | 7c69957d784c9144aa03ed1caf1c123fd0dbffff /gcc | |
parent | f8191e640d0bfc3e92dbd47a3b086e3e88fffcd7 (diff) | |
download | gcc-0f4fd75d9a8c1b923d996e05c0ae4f048c1cc795.zip gcc-0f4fd75d9a8c1b923d996e05c0ae4f048c1cc795.tar.gz gcc-0f4fd75d9a8c1b923d996e05c0ae4f048c1cc795.tar.bz2 |
tree.c (make_lang_type_fn): New funtion pointer.
* tree.c (make_lang_type_fn): New funtion pointer.
(make_lang_type): Call it.
* tree.h (make_lang_type): Declare.
(make_lang_type_fn): Likewise.
* rs6000.c (rs6000_build_va_list): Use make_lang_type.
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r29864
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 4 | ||||
-rw-r--r-- | gcc/tree.c | 15 | ||||
-rw-r--r-- | gcc/tree.h | 2 |
4 files changed, 28 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cec17c3..821d357 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +Thu Oct 7 22:53:00 1999 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> + Mark Mitchell <mark@codesourcery.com> + + * tree.c (make_lang_type_fn): New funtion pointer. + (make_lang_type): Call it. + * tree.h (make_lang_type): Declare. + (make_lang_type_fn): Likewise. + * rs6000.c (rs6000_build_va_list): Use make_lang_type. + Thu Oct 7 00:36:17 MDT 1999 Diego Novillo <dnovillo@cygnus.com> * config/rs6000/rs6000.c (secondary_reload_class): For TARGET_ELF diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 2e961c4..4080919 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1782,10 +1782,10 @@ rs6000_build_va_list () if (DEFAULT_ABI != ABI_V4 && DEFAULT_ABI != ABI_SOLARIS) return ptr_type_node; - record = make_node (RECORD_TYPE); + record = make_lang_type (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); uchar_type_node = make_unsigned_type (CHAR_TYPE_SIZE); - + f_gpr = build_decl (FIELD_DECL, get_identifier ("gpr"), uchar_type_node); f_fpr = build_decl (FIELD_DECL, get_identifier ("fpr"), uchar_type_node); f_ovf = build_decl (FIELD_DECL, get_identifier ("overflow_arg_area"), @@ -1103,6 +1103,21 @@ make_node (code) return t; } + +/* A front-end can reset this to an appropriate function if types need + special handling. */ + +tree (*make_lang_type_fn) PROTO((enum tree_code)) = make_node; + +/* Return a new type (with the indicated CODE), doing whatever + language-specific processing is required. */ + +tree +make_lang_type (code) + enum tree_code code; +{ + return (*make_lang_type_fn) (code); +} /* Return a new node with the same contents as NODE except that its TREE_CHAIN is zero and it has a fresh uid. Unlike make_node, this @@ -1560,6 +1560,8 @@ extern char *expralloc PROTO((int)); to zero except for a few of the common fields. */ extern tree make_node PROTO((enum tree_code)); +extern tree make_lang_type PROTO((enum tree_code)); +extern tree (*make_lang_type_fn) PROTO((enum tree_code)); /* Make a copy of a node, with all the same contents except for TREE_PERMANENT. (The copy is permanent |