OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / langhooks.h
index 4696c6f..cfb26de 100644 (file)
@@ -90,7 +90,7 @@ struct lang_hooks_for_tree_dump
 {
   /* Dump language-specific parts of tree nodes.  Returns nonzero if it
      does not want the usual dumping of the second argument.  */
-  int (*dump_tree) PARAMS ((void *, tree));
+  bool (*dump_tree) PARAMS ((void *, tree));
 
   /* Determine type qualifiers in a language-specific way.  */
   int (*type_quals) PARAMS ((tree));
@@ -180,6 +180,9 @@ struct lang_hooks_for_decls
   /* Obtain a list of globals and do final output on them at end
      of compilation */
   void (*final_write_globals) PARAMS ((void));
+
+  /* True if this decl may be called via a sibcall.  */
+  bool (*ok_for_sibcall) PARAMS ((tree));
 };
 
 /* Language-specific hooks.  See langhooks-def.h for defaults.  */
@@ -193,19 +196,26 @@ struct lang_hooks
      identifier nodes long enough for the language-specific slots.  */
   size_t identifier_size;
 
+  /* Determines the size of any language-specific 'x' or 'c' nodes.
+     Since it is called from make_node, the only information available
+     is the tree code.  Expected to abort on unrecognized codes.  */
+  size_t (*tree_size) PARAMS ((enum tree_code));
+
   /* The first callback made to the front end, for simple
-     initialization needed before any calls to decode_option.  */
-  void (*init_options) PARAMS ((void));
-
-  /* Function called with an option vector as argument, to decode a
-     single option (typically starting with -f or -W or +).  It should
-     return the number of command-line arguments it uses if it handles
-     the option, or 0 and not complain if it does not recognize the
-     option.  If this function returns a negative number, then its
-     absolute value is the number of command-line arguments used, but,
-     in addition, no language-independent option processing should be
-     done for this option.  */
-  int (*decode_option) PARAMS ((int, char **));
+     initialization needed before any calls to handle_option.  Return
+     the language mask to filter the switch array with.  */
+  int (*init_options) PARAMS ((void));
+
+  /* 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 resonsible for
+     checking whether ARG is NULL, which indicates that no argument
+     was in fact supplied.  For -f and -W switches, VALUE is 1 or 0
+     for the positive and negative forms respectively.
+
+     Return 1 if the switch is valid, 0 if invalid, and -1 if it's
+     valid and should not be treated as language-independent too.  */
+  int (*handle_option) (size_t code, const char *arg, int value);
 
   /* Called when all command line options have been parsed to allow
      further processing and initialization