OSDN Git Service

* langhooks.h (builtin_function): New langhook.
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Jul 2004 19:35:04 +0000 (19:35 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Jul 2004 19:35:04 +0000 (19:35 +0000)
* langhooks-def.h (LANG_HOOKS_BUILTIN_FUNCTION): New.
(LANG_HOOKS_INITIALIZER): Update.
* tree.h (builtin_function): Remove.
* doc/tm.texi: Update.
* c-tree.h (builtin_function): Declare.
* c-common.c, config/alpha/alpha.c, config/arm/arm.c,
config/c4x/c4x.c, config/frv/frv.c, config/i386/i386.c,
config/ia64/ia64.c, config/iq2000/iq2000.c,
config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c,
config/stormy16/stormy16.c: All callers of builtin_function
changed.

ada:
* gigi.h (builtin_function): Declare.

cp:
* cp-tree.h (builtin_function): Declare.

fortran:
* trans.h (builtin_function): Declare.

java:
* java-tree.h (builtin_function): Declare.

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

26 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gigi.h
gcc/c-common.c
gcc/c-tree.h
gcc/config/alpha/alpha.c
gcc/config/arm/arm.c
gcc/config/c4x/c4x.c
gcc/config/frv/frv.c
gcc/config/i386/i386.c
gcc/config/ia64/ia64.c
gcc/config/iq2000/iq2000.c
gcc/config/rs6000/rs6000.c
gcc/config/s390/s390.c
gcc/config/sh/sh.c
gcc/config/stormy16/stormy16.c
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/doc/tm.texi
gcc/fortran/ChangeLog
gcc/fortran/trans.h
gcc/java/ChangeLog
gcc/java/java-tree.h
gcc/langhooks-def.h
gcc/langhooks.h
gcc/tree.h

index f90423b..f71c905 100644 (file)
@@ -1,3 +1,18 @@
+2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * langhooks.h (builtin_function): New langhook.
+       * langhooks-def.h (LANG_HOOKS_BUILTIN_FUNCTION): New.
+       (LANG_HOOKS_INITIALIZER): Update.
+       * tree.h (builtin_function): Remove.
+       * doc/tm.texi: Update.
+       * c-tree.h (builtin_function): Declare.
+       * c-common.c, config/alpha/alpha.c, config/arm/arm.c,
+       config/c4x/c4x.c, config/frv/frv.c, config/i386/i386.c,
+       config/ia64/ia64.c, config/iq2000/iq2000.c,
+       config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c,
+       config/stormy16/stormy16.c: All callers of builtin_function
+       changed.
+
 2004-07-17  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR target/16556
index 5b5a0e9..5af5ee3 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * gigi.h (builtin_function): Declare.
+
 2004-07-15  Robert Dewar  <dewar@gnat.com>
 
        * makegpr.adb, s-secsta.ads, sem_ch3.adb, sem_case.adb: Minor
index e633341..78a2f2b 100644 (file)
@@ -693,6 +693,10 @@ extern tree fill_vms_descriptor (tree, Entity_Id);
    should not be allocated in a register.  Return true if successful.  */
 extern bool gnat_mark_addressable (tree);
 
+/* Implementation of the builtin_function langhook.  */
+extern tree builtin_function (const char *, tree, int, enum built_in_class,
+                             const char *, tree);
+
 /* This function is called by the front end to enumerate all the supported
    modes for the machine.  We pass a function which is called back with
    the following integer parameters:
index e177d88..cc743cc 100644 (file)
@@ -3106,7 +3106,8 @@ c_common_nodes_and_builtins (void)
        abort ();                                                       \
                                                                        \
       if (!BOTH_P)                                                     \
-       decl = builtin_function (NAME, builtin_types[TYPE], ENUM,       \
+       decl = lang_hooks.builtin_function (NAME, builtin_types[TYPE],  \
+                                ENUM,                                  \
                                 CLASS,                                 \
                                 (FALLBACK_P                            \
                                  ? (NAME + strlen ("__builtin_"))      \
@@ -3214,12 +3215,14 @@ builtin_function_2 (const char *builtin_name, const char *name,
   tree decl = NULL_TREE;
 
   if (builtin_name != 0)
-    bdecl = builtin_function (builtin_name, builtin_type, function_code,
-                             class, library_name_p ? name : NULL, attrs);
+    bdecl = lang_hooks.builtin_function (builtin_name, builtin_type,
+                                        function_code, class,
+                                        library_name_p ? name : NULL, attrs);
 
   if (name != 0 && !flag_no_builtin && !builtin_function_disabled_p (name)
       && !(nonansi_p && flag_no_nonansi_builtin))
-    decl = builtin_function (name, type, function_code, class, NULL, attrs);
+    decl = lang_hooks.builtin_function (name, type, function_code, class,
+                                       NULL, attrs);
 
   return (bdecl != 0 ? bdecl : decl);
 }
index 5eb2e81..7cb69ba 100644 (file)
@@ -180,6 +180,8 @@ extern void c_pop_function_context (struct function *);
 extern void push_parm_decl (tree);
 extern tree pushdecl_top_level (tree);
 extern tree set_array_declarator_type (tree, tree, int);
+extern tree builtin_function (const char *, tree, int, enum built_in_class,
+                             const char *, tree);
 extern void shadow_tag (tree);
 extern void shadow_tag_warned (tree, int);
 extern tree start_enum (tree);
index e10468b..102cbb1 100644 (file)
@@ -6532,8 +6532,8 @@ alpha_init_builtins (void)
   p = zero_arg_builtins;
   for (i = 0; i < ARRAY_SIZE (zero_arg_builtins); ++i, ++p)
     if ((target_flags & p->target_mask) == p->target_mask)
-      builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
-                       NULL, NULL_TREE);
+      lang_hooks.builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
+                                  NULL, NULL_TREE);
 
   ftype = build_function_type_list (long_integer_type_node,
                                    long_integer_type_node, NULL_TREE);
@@ -6541,8 +6541,8 @@ alpha_init_builtins (void)
   p = one_arg_builtins;
   for (i = 0; i < ARRAY_SIZE (one_arg_builtins); ++i, ++p)
     if ((target_flags & p->target_mask) == p->target_mask)
-      builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
-                       NULL, NULL_TREE);
+      lang_hooks.builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
+                                  NULL, NULL_TREE);
 
   ftype = build_function_type_list (long_integer_type_node,
                                    long_integer_type_node,
@@ -6551,18 +6551,18 @@ alpha_init_builtins (void)
   p = two_arg_builtins;
   for (i = 0; i < ARRAY_SIZE (two_arg_builtins); ++i, ++p)
     if ((target_flags & p->target_mask) == p->target_mask)
-      builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
-                       NULL, NULL_TREE);
+      lang_hooks.builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
+                                  NULL, NULL_TREE);
 
   ftype = build_function_type (ptr_type_node, void_list_node);
-  builtin_function ("__builtin_thread_pointer", ftype,
-                   ALPHA_BUILTIN_THREAD_POINTER, BUILT_IN_MD,
-                   NULL, NULL_TREE);
+  lang_hooks.builtin_function ("__builtin_thread_pointer", ftype,
+                              ALPHA_BUILTIN_THREAD_POINTER, BUILT_IN_MD,
+                              NULL, NULL_TREE);
 
   ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
-  builtin_function ("__builtin_set_thread_pointer", ftype,
-                   ALPHA_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD,
-                   NULL, NULL_TREE);
+  lang_hooks.builtin_function ("__builtin_set_thread_pointer", ftype,
+                              ALPHA_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD,
+                              NULL, NULL_TREE);
 }
 
 /* Expand an expression EXP that calls a built-in function,
index 1de284e..f342a80 100644 (file)
@@ -51,6 +51,7 @@
 #include "target.h"
 #include "target-def.h"
 #include "debug.h"
+#include "langhooks.h"
 
 /* Forward definitions of types.  */
 typedef struct minipool_node    Mnode;
@@ -11591,7 +11592,8 @@ arm_debugger_arg_offset (int value, rtx addr)
   do                                                                   \
     {                                                                  \
       if ((MASK) & insn_flags)                                         \
-        builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL, NULL_TREE);       \
+        lang_hooks.builtin_function ((NAME), (TYPE), (CODE),           \
+                                    BUILT_IN_MD, NULL, NULL_TREE);     \
     }                                                                  \
   while (0)
 
index 4e6dd8f..4011a51 100644 (file)
@@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA.  */
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
+#include "langhooks.h"
 
 rtx smulhi3_libfunc;
 rtx umulhi3_libfunc;
@@ -4767,41 +4768,52 @@ c4x_init_builtins (void)
 {
   tree endlink = void_list_node;
 
-  builtin_function ("fast_ftoi",
-                   build_function_type 
-                   (integer_type_node,
-                    tree_cons (NULL_TREE, double_type_node, endlink)),
-                   C4X_BUILTIN_FIX, BUILT_IN_MD, NULL, NULL_TREE);
-  builtin_function ("ansi_ftoi",
-                   build_function_type 
-                   (integer_type_node, 
-                    tree_cons (NULL_TREE, double_type_node, endlink)),
-                   C4X_BUILTIN_FIX_ANSI, BUILT_IN_MD, NULL, NULL_TREE);
+  lang_hooks.builtin_function ("fast_ftoi",
+                              build_function_type 
+                              (integer_type_node,
+                               tree_cons (NULL_TREE, double_type_node,
+                                          endlink)),
+                              C4X_BUILTIN_FIX, BUILT_IN_MD, NULL, NULL_TREE);
+  lang_hooks.builtin_function ("ansi_ftoi",
+                              build_function_type 
+                              (integer_type_node, 
+                               tree_cons (NULL_TREE, double_type_node,
+                                          endlink)),
+                              C4X_BUILTIN_FIX_ANSI, BUILT_IN_MD, NULL,
+                              NULL_TREE);
   if (TARGET_C3X)
-    builtin_function ("fast_imult",
-                     build_function_type
-                     (integer_type_node, 
-                      tree_cons (NULL_TREE, integer_type_node,
-                                 tree_cons (NULL_TREE,
-                                            integer_type_node, endlink))),
-                     C4X_BUILTIN_MPYI, BUILT_IN_MD, NULL, NULL_TREE);
+    lang_hooks.builtin_function ("fast_imult",
+                                build_function_type
+                                (integer_type_node, 
+                                 tree_cons (NULL_TREE, integer_type_node,
+                                            tree_cons (NULL_TREE,
+                                                       integer_type_node,
+                                                       endlink))),
+                                C4X_BUILTIN_MPYI, BUILT_IN_MD, NULL,
+                                NULL_TREE);
   else
     {
-      builtin_function ("toieee",
-                       build_function_type 
-                       (double_type_node,
-                        tree_cons (NULL_TREE, double_type_node, endlink)),
-                       C4X_BUILTIN_TOIEEE, BUILT_IN_MD, NULL, NULL_TREE);
-      builtin_function ("frieee",
-                       build_function_type
-                       (double_type_node, 
-                        tree_cons (NULL_TREE, double_type_node, endlink)),
-                       C4X_BUILTIN_FRIEEE, BUILT_IN_MD, NULL, NULL_TREE);
-      builtin_function ("fast_invf",
-                       build_function_type 
-                       (double_type_node, 
-                        tree_cons (NULL_TREE, double_type_node, endlink)),
-                       C4X_BUILTIN_RCPF, BUILT_IN_MD, NULL, NULL_TREE);
+      lang_hooks.builtin_function ("toieee",
+                                  build_function_type 
+                                  (double_type_node,
+                                   tree_cons (NULL_TREE, double_type_node,
+                                              endlink)),
+                                  C4X_BUILTIN_TOIEEE, BUILT_IN_MD, NULL,
+                                  NULL_TREE);
+      lang_hooks.builtin_function ("frieee",
+                                  build_function_type
+                                  (double_type_node, 
+                                   tree_cons (NULL_TREE, double_type_node,
+                                              endlink)),
+                                  C4X_BUILTIN_FRIEEE, BUILT_IN_MD, NULL,
+                                  NULL_TREE);
+      lang_hooks.builtin_function ("fast_invf",
+                                  build_function_type 
+                                  (double_type_node, 
+                                   tree_cons (NULL_TREE, double_type_node,
+                                              endlink)),
+                                  C4X_BUILTIN_RCPF, BUILT_IN_MD, NULL,
+                                  NULL_TREE);
     }
 }
 
index 5e4a12f..d935540 100644 (file)
@@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA.  */
 #include "target-def.h"
 #include "targhooks.h"
 #include "integrate.h"
+#include "langhooks.h"
 
 #ifndef FRV_INLINE
 #define FRV_INLINE inline
@@ -8888,7 +8889,7 @@ frv_pack_insns (void)
 
 \f
 #define def_builtin(name, type, code) \
-  builtin_function ((name), (type), (code), BUILT_IN_MD, NULL, NULL)
+  lang_hooks.builtin_function ((name), (type), (code), BUILT_IN_MD, NULL, NULL)
 
 struct builtin_description
 {
index 02af192..b8aa661 100644 (file)
@@ -12665,12 +12665,12 @@ x86_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt)
 #endif
 }
 \f
-#define def_builtin(MASK, NAME, TYPE, CODE)                    \
-do {                                                           \
-  if ((MASK) & target_flags                                    \
-      && (!((MASK) & MASK_64BIT) || TARGET_64BIT))             \
-    builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD,     \
-                     NULL, NULL_TREE);                         \
+#define def_builtin(MASK, NAME, TYPE, CODE)                            \
+do {                                                                   \
+  if ((MASK) & target_flags                                            \
+      && (!((MASK) & MASK_64BIT) || TARGET_64BIT))                     \
+    lang_hooks.builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD,  \
+                                NULL, NULL_TREE);                      \
 } while (0)
 
 struct builtin_description
index 85ac56b..bee9720 100644 (file)
@@ -8184,8 +8184,9 @@ ia64_init_builtins (void)
     (*lang_hooks.types.register_builtin_type) (long_double_type_node,
                                               "__float128");
 
-#define def_builtin(name, type, code) \
-  builtin_function ((name), (type), (code), BUILT_IN_MD, NULL, NULL_TREE)
+#define def_builtin(name, type, code)                                  \
+  lang_hooks.builtin_function ((name), (type), (code), BUILT_IN_MD,    \
+                              NULL, NULL_TREE)
 
   def_builtin ("__sync_val_compare_and_swap_si", si_ftype_psi_si_si,
               IA64_BUILTIN_VAL_COMPARE_AND_SWAP_SI);
index 0e2f7c1..b2156d6 100644 (file)
@@ -45,6 +45,7 @@ Boston, MA 02111-1307, USA.  */
 #include "debug.h"
 #include "target.h"
 #include "target-def.h"
+#include "langhooks.h"
 
 /* Enumeration for all of the relational tests, so that we can build
    arrays indexed by the test type, and not worry about the order
@@ -2690,8 +2691,9 @@ iq2000_output_conditional_branch (rtx insn, rtx * operands, int two_operands_p,
   return 0;
 }
 
-#define def_builtin(NAME, TYPE, CODE) \
-  builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL, NULL_TREE)
+#define def_builtin(NAME, TYPE, CODE)                                  \
+  lang_hooks.builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD,    \
+                              NULL, NULL_TREE)
 
 static void
 iq2000_init_builtins (void)
index b6ee831..e81e1b3 100644 (file)
@@ -5618,11 +5618,11 @@ rs6000_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p)
 
 /* Builtins.  */
 
-#define def_builtin(MASK, NAME, TYPE, CODE)                    \
-do {                                                           \
-  if ((MASK) & target_flags)                                   \
-    builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD,     \
-                     NULL, NULL_TREE);                         \
+#define def_builtin(MASK, NAME, TYPE, CODE)                            \
+do {                                                                   \
+  if ((MASK) & target_flags)                                           \
+    lang_hooks.builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD,  \
+                                NULL, NULL_TREE);                      \
 } while (0)
 
 /* Simple ternary operations: VECd = foo (VECa, VECb, VECc).  */
index cde728a..9de0350 100644 (file)
@@ -6802,14 +6802,14 @@ s390_init_builtins (void)
   tree ftype;
 
   ftype = build_function_type (ptr_type_node, void_list_node);
-  builtin_function ("__builtin_thread_pointer", ftype,
-                   S390_BUILTIN_THREAD_POINTER, BUILT_IN_MD,
-                   NULL, NULL_TREE);
+  lang_hooks.builtin_function ("__builtin_thread_pointer", ftype,
+                              S390_BUILTIN_THREAD_POINTER, BUILT_IN_MD,
+                              NULL, NULL_TREE);
 
   ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
-  builtin_function ("__builtin_set_thread_pointer", ftype,
-                   S390_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD,
-                   NULL, NULL_TREE);
+  lang_hooks.builtin_function ("__builtin_set_thread_pointer", ftype,
+                              S390_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD,
+                              NULL, NULL_TREE);
 }
 
 /* Expand an expression EXP that calls a built-in function,
index 7f99cab..d8e3e61 100644 (file)
@@ -9291,8 +9291,8 @@ sh_media_init_builtins (void)
          if (signature < SH_BLTIN_NUM_SHARED_SIGNATURES)
            shared[signature] = type;
        }
-      builtin_function (d->name, type, d - bdesc, BUILT_IN_MD,
-                       NULL, NULL_TREE);
+      lang_hooks.builtin_function (d->name, type, d - bdesc, BUILT_IN_MD,
+                                  NULL, NULL_TREE);
     }
 }
 
index 7f2a2fe..a5ee896 100644 (file)
@@ -2109,9 +2109,9 @@ xstormy16_init_builtins (void)
          else
            args = tree_cons (NULL_TREE, arg, args);
        }
-      builtin_function (s16builtins[i].name,
-                       build_function_type (ret_type, args),
-                       i, BUILT_IN_MD, NULL, NULL);
+      lang_hooks.builtin_function (s16builtins[i].name,
+                                  build_function_type (ret_type, args),
+                                  i, BUILT_IN_MD, NULL, NULL);
     }
 }
 
index a67bfc3..1e0bec1 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * cp-tree.h (builtin_function): Declare.
+
 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
 
        * class.c (finish_struct_methods): Remove unncessary code.
index a7d35d4..7ed1d5f 100644 (file)
@@ -3763,6 +3763,8 @@ extern tree declare_global_var                  (tree, tree);
 extern void register_dtor_fn                    (tree);
 extern tmpl_spec_kind current_tmpl_spec_kind    (int);
 extern tree cp_fname_init                      (const char *, tree *);
+extern tree builtin_function (const char *, tree, int, enum built_in_class,
+                             const char *, tree);
 extern tree check_elaborated_type_specifier     (enum tag_types, tree, bool);
 extern void warn_extern_redeclared_static (tree, tree);
 extern bool cp_missing_noreturn_ok_p           (tree);
index 30c58d6..ca5c995 100644 (file)
@@ -9110,7 +9110,8 @@ instructions that would otherwise not normally be generated because
 they have no equivalent in the source language (for example, SIMD vector
 instructions or prefetch instructions).
 
-To create a built-in function, call the function @code{builtin_function}
+To create a built-in function, call the function
+@code{lang_hooks.builtin_function}
 which is defined by the language front end.  You can use any type nodes set
 up by @code{build_common_tree_nodes} and @code{build_common_tree_nodes_2};
 only language front ends that use those two functions will call
index 925b45c..819d735 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * trans.h (builtin_function): Declare.
+
 2004-07-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
 
        PR fortran/16404
index fe8db4e..9d64734 100644 (file)
@@ -427,6 +427,8 @@ void pushlevel (int);
 tree poplevel (int, int, int);
 tree getdecls (void);
 tree gfc_truthvalue_conversion (tree);
+tree builtin_function (const char *, tree, int, enum built_in_class,
+                      const char *, tree);
 
 /* Runtime library function decls.  */
 extern GTY(()) tree gfor_fndecl_internal_malloc;
index 5cd390e..f064123 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * java-tree.h (builtin_function): Declare.
+
 2004-07-16  Steven Bosscher  <stevenb@suse.de>
 
        * parse.y (java_complete_expand_methods, java_expand_classes): Don't
index 8959976..5f33ec5 100644 (file)
@@ -1355,6 +1355,8 @@ extern void gen_indirect_dispatch_tables (tree type);
 extern int split_qualified_name (tree *left, tree *right, tree source);
 extern int in_same_package (tree, tree);
 
+extern tree builtin_function (const char *, tree, int, enum built_in_class,
+                             const char *, tree);
 
 #define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL)
 
index ae8dcd2..1f7f32c 100644 (file)
@@ -126,6 +126,7 @@ extern int lhd_gimplify_expr (tree *, tree *, tree *);
 #define LANG_HOOKS_EXPR_SIZE           lhd_expr_size
 #define LANG_HOOKS_TREE_SIZE           lhd_tree_size
 #define LANG_HOOKS_TYPES_COMPATIBLE_P  lhd_types_compatible_p
+#define LANG_HOOKS_BUILTIN_FUNCTION    builtin_function
 
 #define LANG_HOOKS_FUNCTION_INIT       lhd_do_nothing_f
 #define LANG_HOOKS_FUNCTION_FINAL      lhd_do_nothing_f
@@ -301,6 +302,7 @@ extern tree lhd_make_node (enum tree_code);
   LANG_HOOKS_FOR_TYPES_INITIALIZER, \
   LANG_HOOKS_GIMPLIFY_EXPR, \
   LANG_HOOKS_FOLD_OBJ_TYPE_REF, \
+  LANG_HOOKS_BUILTIN_FUNCTION, \
 }
 
 #endif /* GCC_LANG_HOOKS_DEF_H */
index 345e89c..349c450 100644 (file)
@@ -407,6 +407,18 @@ struct lang_hooks
      KNOWN_TYPE carries the true type of the OBJ_TYPE_REF_OBJECT.  */
   tree (*fold_obj_type_ref) (tree, tree);
 
+  /* Return a definition for a builtin function named NAME and whose data type
+     is TYPE.  TYPE should be a function type with argument types.
+     FUNCTION_CODE tells later passes how to compile calls to this function.
+     See tree.h for its possible values.
+
+     If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME,
+     the name to be called if we can't opencode the function.  If
+     ATTRS is nonzero, use that for the function's attribute list.  */
+  tree (*builtin_function) (const char *name, tree type, int function_code,
+                           enum built_in_class class,
+                           const char *library_name, tree attrs);
+
   /* Whenever you add entries here, make sure you adjust langhooks-def.h
      and langhooks.c accordingly.  */
 };
index 0c30868..31e1173 100644 (file)
@@ -3306,11 +3306,6 @@ extern GTY(()) tree current_function_func_begin_label;
    chain of FILE_DECLs; currently only C uses it.  */
 
 extern GTY(()) tree current_file_decl;
-
-/* Declare a predefined function.  Return the declaration.  This function is
-   provided by each language frontend.  */
-extern tree builtin_function (const char *, tree, int, enum built_in_class,
-                             const char *, tree);
 \f
 /* In tree.c */
 extern unsigned crc32_string (unsigned, const char *);