OSDN Git Service

* tree.c (make_lang_type_fn): New funtion pointer.
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Oct 1999 05:48:29 +0000 (05:48 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Oct 1999 05:48:29 +0000 (05:48 +0000)
        (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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29864 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/tree.c
gcc/tree.h

index cec17c3..821d357 100644 (file)
@@ -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
index 2e961c4..4080919 100644 (file)
@@ -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"),
index 8f70747..3538022 100644 (file)
@@ -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);
+}
 \f
 /* 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
index cacdb28..d5a4b45 100644 (file)
@@ -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