OSDN Git Service

* alias.c: Follow spelling conventions.
[pf3gnuchains/gcc-fork.git] / gcc / langhooks.h
index 0ab10e0..195446c 100644 (file)
@@ -33,36 +33,32 @@ typedef void (*lang_print_tree_hook) (FILE *, tree, int indent);
 
 struct lang_hooks_for_tree_inlining
 {
-  union tree_node *(*walk_subtrees) (union tree_node **, int *,
-                                    union tree_node *(*)
-                                    (union tree_node **, int *, void *),
-                                    void *, void *);
-  int (*cannot_inline_tree_fn) (union tree_node **);
-  int (*disregard_inline_limits) (union tree_node *);
-  union tree_node *(*add_pending_fn_decls) (void *, union tree_node *);
-  int (*tree_chain_matters_p) (union tree_node *);
-  int (*auto_var_in_fn_p) (union tree_node *, union tree_node *);
-  union tree_node *(*copy_res_decl_for_inlining) (union tree_node *,
-                                                 union tree_node *,
-                                                 union tree_node *,
-                                                 void *, int *, tree);
-  int (*anon_aggr_type_p) (union tree_node *);
-  bool (*var_mod_type_p) (union tree_node *);
-  int (*start_inlining) (union tree_node *);
-  void (*end_inlining) (union tree_node *);
-  union tree_node *(*convert_parm_for_inlining) (union tree_node *,
-                                                union tree_node *,
-                                                union tree_node *);
-  int (*estimate_num_insns) (union tree_node *);
+  tree (*walk_subtrees) (tree *, int *,
+                        tree (*) (tree *, int *, void *),
+                        void *, void *);
+  int (*cannot_inline_tree_fn) (tree *);
+  int (*disregard_inline_limits) (tree);
+  tree (*add_pending_fn_decls) (void *, tree);
+  int (*tree_chain_matters_p) (tree);
+  int (*auto_var_in_fn_p) (tree, tree);
+  tree (*copy_res_decl_for_inlining) (tree, tree, tree,
+                                     void *, int *, tree);
+  int (*anon_aggr_type_p) (tree);
+  bool (*var_mod_type_p) (tree);
+  int (*start_inlining) (tree);
+  void (*end_inlining) (tree);
+  tree (*convert_parm_for_inlining) (tree, tree, tree);
+  int (*estimate_num_insns) (tree);
 };
 
 struct lang_hooks_for_callgraph
 {
-  /* Function passed as argument is needed and will be compiled.
-     Lower the representation so the calls are explicit.  */
-  void (*lower_function) (union tree_node *);
+  /* The node passed is a language-specific tree node.  If its contents
+     are relevant to use of other declarations, mark them.  */
+  tree (*analyze_expr) (tree *, int *, tree);
+
   /* Produce RTL for function passed as argument.  */
-  void (*expand_function) (union tree_node *);
+  void (*expand_function) (tree);
 };
 
 /* Lang hooks for management of language-specific data or status
@@ -82,6 +78,19 @@ struct lang_hooks_for_functions
   void (*leave_nested) (struct function *);
 };
 
+/* Lang hooks for rtl code generation.  */
+struct lang_hooks_for_rtl_expansion
+{
+  /* Called after expand_function_start, but before expanding the body.  */
+  void (*start) (void);
+
+  /* Called to expand each statement.  */
+  void (*stmt) (tree);
+
+  /* Called after expanding the body but before expand_function_end.  */
+  void (*end) (void);
+};
+
 /* The following hooks are used by tree-dump.c.  */
 
 struct lang_hooks_for_tree_dump
@@ -128,6 +137,15 @@ struct lang_hooks_for_types
      arguments.  The default hook aborts.  */
   tree (*type_promotes_to) (tree);
 
+  /* Register TYPE as a builtin type with the indicated NAME.  The
+     TYPE is placed in the outermost lexical scope.  The semantics
+     should be analogous to:
+
+       typedef TYPE NAME;
+
+     in C.  The default hook ignores the declaration.  */
+  void (*register_builtin_type) (tree, const char *);
+
   /* This routine is called in tree.c to print an error message for
      invalid use of an incomplete type.  VALUE is the expression that
      was used (or 0 if that isn't known) and TYPE is the type that was
@@ -207,6 +225,10 @@ struct lang_hooks
      the language mask to filter the switch array with.  */
   unsigned int (*init_options) (unsigned int argc, const char **argv);
 
+  /* Callback used to perform language-specific initialization for the
+     global diagnostic context structure.  */
+  void (*initialize_diagnostics) (struct diagnostic_context *);
+
   /* Handle the switch CODE, which has real type enum opt_code from
      options.h.  If the switch takes an argument, it is passed in ARG
      which points to permanent storage.  The handler is responsible for
@@ -218,9 +240,6 @@ struct lang_hooks
      valid and should not be treated as language-independent too.  */
   int (*handle_option) (size_t code, const char *arg, int value);
 
-  /* Handle a filename on the command line.  */
-  void (*handle_filename) (const char *filename);
-
   /* Return false to use the default complaint about a missing
      argument, otherwise output a complaint and return true.  */
   bool (*missing_argument) (const char *opt, size_t code);
@@ -276,10 +295,6 @@ struct lang_hooks
      error_mark_node).  */
   tree (*truthvalue_conversion) (tree);
 
-  /* Possibly apply default attributes to a function (represented by
-     a FUNCTION_DECL).  */
-  void (*insert_default_attributes) (tree);
-
   /* Hook called by safe_from_p for language-specific tree codes.  It is
      up to the language front-end to install a hook if it has any such
      codes that safe_from_p needs to know about.  Since same_from_p will
@@ -369,6 +384,10 @@ struct lang_hooks
      semantics in cases that it doesn't want to handle specially.  */
   tree (*expr_size) (tree);
 
+  /* Called from uninitialized_vars_warning to find out if a variable is
+     uninitialized based on DECL_INITIAL.  */
+  bool (*decl_uninit) (tree);
+
   /* Pointers to machine-independent attribute tables, for front ends
      using attribs.c.  If one is NULL, it is ignored.  Respectively, a
      table of attributes specific to the language, a table of
@@ -391,6 +410,8 @@ struct lang_hooks
 
   struct lang_hooks_for_types types;
 
+  struct lang_hooks_for_rtl_expansion rtl_expand;
+
   /* Whenever you add entries here, make sure you adjust langhooks-def.h
      and langhooks.c accordingly.  */
 };