* c-decl.c (print_lang_decl, print_lang_type): Remove.
(print_lang_identifier): Rename c_print_identifier.
* c-lang.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New.
(print_lang_statistics, lang_print_xnode): Remove.
* c-parse.in (set_yydebug): Rename c_set_yydebug.
* c-tree.h (c_set_yydebug, c_print_identifier): New.
* langhooks-def.h (lhd_print_tree_nothing, lhd_set_yydebug): New.
LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New.
(LANG_HOOKS_INITIALIZER): Update.
* langhooks.h (struct lang_hooks): New members.
(lang_print_tree_hook): New.
* langhooks.c (lhd_print_tree_nothing, lhd_set_yydebug): New.
* print-tree.c: Include langhooks.h.
(print_node): Update.
* toplev.c (decode_d_option): Update.
* tree.c: Include langhooks.h.
(dump_tree_statistics): Update.
* tree.h (print_lang_statistics, print_lang_decl, print_lang_type,
print_lang_identifier, set_yydebug, lang_print_xnode): Remove.
ada:
* misc.c (gnat_print_decl, gnat_print_type): Renamed.
(LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE): Override.
(print_lang_statistics, lang_print_xnode, print_lang_identifier,
set_yydebug): Remove.
cp:
* cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
* cp-tree.h (print_class_statistics): Remove.
(cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
cxx_print_identifier, cxx_set_yydebug): New.
* lex.c (set_yydebug): Rename c_set_yydebug.
* ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
lang_print_xnode): Rename.
* tree.c (print_lang_statistics): Rename.
f:
* com.c (ffe_print_identifier): Rename.
(LANG_HOOKS_PRINT_IDENTIFIER): Override.
(lang_print_xnode, print_lang_decl, print_lang_statistics,
print_lang_type, set_yydebug): Remove.
java:
* java-tree.h (java_set_yydebug): New.
* jcf-parse.c (set_yydebug): Rename java_set_yydebug.
* lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
(print_lang_decl, print_lang_type, print_lang_identifier,
print_lang_statistics, lang_print_xnode): Remove.
objc:
* objc-act.c (LANG_HOOKS_PRINT_IDENTIFIER,
LANG_HOOKS_SET_YYDEBUG): Override.
(lang_print_xnode, print_lang_statistics): Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46907
138bc75d-0d04-0410-961f-
82ee72b054a4
+2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * Makefile.in: Update.
+ * c-decl.c (print_lang_decl, print_lang_type): Remove.
+ (print_lang_identifier): Rename c_print_identifier.
+ * c-lang.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New.
+ (print_lang_statistics, lang_print_xnode): Remove.
+ * c-parse.in (set_yydebug): Rename c_set_yydebug.
+ * c-tree.h (c_set_yydebug, c_print_identifier): New.
+ * langhooks-def.h (lhd_print_tree_nothing, lhd_set_yydebug): New.
+ LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
+ LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
+ LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New.
+ (LANG_HOOKS_INITIALIZER): Update.
+ * langhooks.h (struct lang_hooks): New members.
+ (lang_print_tree_hook): New.
+ * langhooks.c (lhd_print_tree_nothing, lhd_set_yydebug): New.
+ * print-tree.c: Include langhooks.h.
+ (print_node): Update.
+ * toplev.c (decode_d_option): Update.
+ * tree.c: Include langhooks.h.
+ (dump_tree_statistics): Update.
+ * tree.h (print_lang_statistics, print_lang_decl, print_lang_type,
+ print_lang_identifier, set_yydebug, lang_print_xnode): Remove.
+objc:
+ * objc-act.c (LANG_HOOKS_PRINT_IDENTIFIER,
+ LANG_HOOKS_SET_YYDEBUG): Override.
+ (lang_print_xnode, print_lang_statistics): Remove.
+
2001-11-09 Richard Henderson <rth@redhat.com>
* dwarf2asm.c (dw2_force_const_mem): Invoke STRIP_NAME_ENCODING
langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h \
tree-inline.h $(RTL_H) insn-config.h integrate.h langhooks.h langhooks-def.h
tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h function.h toplev.h \
- $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H)
+ $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h
tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
expr.h flags.h params.h input.h insn-config.h $(INTEGRATE_H) \
$(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h langhooks.h \
$(C_COMMON_H) tree-inline.h
-print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GGC_H)
+print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GGC_H) \
+ langhooks.h
stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \
function.h $(EXPR_H) $(RTL_H) toplev.h $(GGC_H) $(TM_P_H)
fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \
2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
+ * misc.c (gnat_print_decl, gnat_print_type): Renamed.
+ (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE): Override.
+ (print_lang_statistics, lang_print_xnode, print_lang_identifier,
+ set_yydebug): Remove.
+
+2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
+
* misc.c (LANG_HOOKS_NAME, LANG_HOOKS_IDENTIFIER_SIZE): Override.
(struct lang_hooks): Constify.
(language_string, lang_identify): Remove.
* *
* C Implementation File *
* *
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
* *
* Copyright (C) 1992-2001 Free Software Foundation, Inc. *
* *
static void gnat_init_options PARAMS ((void));
static int gnat_decode_option PARAMS ((int, char **));
static HOST_WIDE_INT gnat_get_alias_set PARAMS ((tree));
+static void gnat_print_decl PARAMS ((FILE *, tree, int));
+static void gnat_print_type PARAMS ((FILE *, tree, int));
/* Structure giving our language-specific hooks. */
#define LANG_HOOKS_HONOR_READONLY 1
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET gnat_get_alias_set
+#undef LANG_HOOKS_PRINT_DECL
+#define LANG_HOOKS_PRINT_DECL gnat_print_decl
+#undef LANG_HOOKS_PRINT_TYPE
+#define LANG_HOOKS_PRINT_TYPE gnat_print_type
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
return NULL_TREE;
}
-/* Print any language-specific compilation statistics. */
-
-void
-print_lang_statistics ()
-{}
-
-void
-lang_print_xnode (file, node, indent)
- FILE *file ATTRIBUTE_UNUSED;
- tree node ATTRIBUTE_UNUSED;
- int indent ATTRIBUTE_UNUSED;
-{
-}
-
/* integrate_decl_tree calls this function, but since we don't use the
DECL_LANG_SPECIFIC field, this is a no-op. */
/* Hooks for print-tree.c: */
-void
-print_lang_decl (file, node, indent)
+static void
+gnat_print_decl (file, node, indent)
FILE *file;
tree node;
int indent;
}
}
-void
-print_lang_type (file, node, indent)
+static void
+gnat_print_type (file, node, indent)
FILE *file;
tree node;
int indent;
}
}
-void
-print_lang_identifier (file, node, indent)
- FILE *file ATTRIBUTE_UNUSED;
- tree node ATTRIBUTE_UNUSED;
- int indent ATTRIBUTE_UNUSED;
-{}
-
/* Expands GNAT-specific GCC tree nodes. The only ones we support
here are TRANSFORM_EXPR, UNCHECKED_CONVERT_EXPR, ALLOCATE_EXPR,
USE_EXPR and NULL_EXPR. */
{
}
-/* Sets some debug flags for the parsed. It does nothing here. */
-
-void
-set_yydebug (value)
- int value ATTRIBUTE_UNUSED;
-{
-}
-
#if 0
/* Return the alignment for GNAT_TYPE. */
return 1;
}
-/* Hooks for print_node. */
-
-void
-print_lang_decl (file, node, indent)
- FILE *file ATTRIBUTE_UNUSED;
- tree node ATTRIBUTE_UNUSED;
- int indent ATTRIBUTE_UNUSED;
-{
-}
-
-void
-print_lang_type (file, node, indent)
- FILE *file ATTRIBUTE_UNUSED;
- tree node ATTRIBUTE_UNUSED;
- int indent ATTRIBUTE_UNUSED;
-{
-}
-
void
-print_lang_identifier (file, node, indent)
+c_print_identifier (file, node, indent)
FILE *file;
tree node;
int indent;
#define LANG_HOOKS_POST_OPTIONS c_post_options
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
+#undef LANG_HOOKS_PRINT_IDENTIFIER
+#define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier
+#undef LANG_HOOKS_SET_YYDEBUG
+#define LANG_HOOKS_SET_YYDEBUG c_set_yydebug
#undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN
#define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
c_parse_init ();
}
-void
-print_lang_statistics ()
-{
-}
-
-/* used by print-tree.c */
-
-void
-lang_print_xnode (file, node, indent)
- FILE *file ATTRIBUTE_UNUSED;
- tree node ATTRIBUTE_UNUSED;
- int indent ATTRIBUTE_UNUSED;
-{
-}
-
/* Used by c-lex.c, but only for objc. */
tree
in order to build the compiler. */
void
-set_yydebug (value)
+c_set_yydebug (value)
int value;
{
#if YYDEBUG != 0
\f
/* in c-parse.in */
extern void c_parse_init PARAMS ((void));
+extern void c_set_yydebug PARAMS ((int));
extern int yyparse_1 PARAMS ((void));
/* in c-aux-info.c */
extern void gen_aux_info_record PARAMS ((tree, int, int, int));
/* in c-decl.c */
+extern void c_print_identifier PARAMS ((FILE *, tree, int));
extern tree build_array_declarator PARAMS ((tree, tree, int, int));
extern tree build_enumerator PARAMS ((tree, tree));
+2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
+ LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
+ LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
+ * cp-tree.h (print_class_statistics): Remove.
+ (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
+ cxx_print_identifier, cxx_set_yydebug): New.
+ * lex.c (set_yydebug): Rename c_set_yydebug.
+ * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
+ lang_print_xnode): Rename.
+ * tree.c (print_lang_statistics): Rename.
+
2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (dump_array): Fix format specifier warning.
#define LANG_HOOKS_POST_OPTIONS cxx_post_options
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set
+#undef LANG_HOOKS_PRINT_STATISTICS
+#define LANG_HOOKS_PRINT_STATISTICS cxx_print_statistics
+#undef LANG_HOOKS_PRINT_XNODE
+#define LANG_HOOKS_PRINT_XNODE cxx_print_xnode
+#undef LANG_HOOKS_PRINT_DECL
+#define LANG_HOOKS_PRINT_DECL cxx_print_decl
+#undef LANG_HOOKS_PRINT_TYPE
+#define LANG_HOOKS_PRINT_TYPE cxx_print_type
+#undef LANG_HOOKS_PRINT_IDENTIFIER
+#define LANG_HOOKS_PRINT_IDENTIFIER cxx_print_identifier
+#undef LANG_HOOKS_SET_YYDEBUG
+#define LANG_HOOKS_SET_YYDEBUG cxx_set_yydebug
#undef LANG_HOOKS_TREE_INLINING_WALK_SUBTREES
#define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES \
extern void push_lang_context PARAMS ((tree));
extern void pop_lang_context PARAMS ((void));
extern tree instantiate_type PARAMS ((tree, tree, enum instantiate_type_flags));
-extern void print_class_statistics PARAMS ((void));
+extern void cxx_print_statistics PARAMS ((void));
+extern void cxx_print_xnode PARAMS ((FILE *, tree, int));
+extern void cxx_print_decl PARAMS ((FILE *, tree, int));
+extern void cxx_print_type PARAMS ((FILE *, tree, int));
+extern void cxx_print_identifier PARAMS ((FILE *, tree, int));
+extern void cxx_set_yydebug PARAMS ((int));
extern void build_self_reference PARAMS ((void));
extern int same_signature_p PARAMS ((tree, tree));
extern void warn_hidden PARAMS ((tree));
in order to build the compiler. */
void
-set_yydebug (value)
+cxx_set_yydebug (value)
int value;
{
#if YYDEBUG != 0
#include "cp-tree.h"
void
-print_lang_decl (file, node, indent)
+cxx_print_decl (file, node, indent)
FILE *file;
tree node;
int indent;
}
void
-print_lang_type (file, node, indent)
+cxx_print_type (file, node, indent)
FILE *file;
register tree node;
int indent;
}
void
-print_lang_identifier (file, node, indent)
+cxx_print_identifier (file, node, indent)
FILE *file;
tree node;
int indent;
}
void
-lang_print_xnode (file, node, indent)
+cxx_print_xnode (file, node, indent)
FILE *file;
tree node;
int indent;
#endif
void
-print_lang_statistics ()
+cxx_print_statistics ()
{
print_search_statistics ();
print_class_statistics ();
+Fri Nov 9 23:16:45 2001 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * com.c (ffe_print_identifier): Rename.
+ (LANG_HOOKS_PRINT_IDENTIFIER): Override.
+ (lang_print_xnode, print_lang_decl, print_lang_statistics,
+ print_lang_type, set_yydebug): Remove.
+
2001-11-09 Zack Weinberg <zack@codesourcery.com>
* g77spec.c (lang_specific_driver): Adjust behavior of -v and
static void ffe_init PARAMS ((void));
static void ffe_finish PARAMS ((void));
static void ffe_init_options PARAMS ((void));
+static void ffe_print_identifier PARAMS ((FILE *, tree, int));
#undef LANG_HOOKS_NAME
#define LANG_HOOKS_NAME "GNU F77"
#define LANG_HOOKS_INIT_OPTIONS ffe_init_options
#undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION ffe_decode_option
+#undef LANG_HOOKS_PRINT_IDENTIFIER
+#define LANG_HOOKS_PRINT_IDENTIFIER ffe_print_identifier
/* We do not wish to use alias-set based aliasing at all. Used in the
extreme (every object with its own set, with equivalences recorded) it
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
-/* used by print-tree.c */
-
-void
-lang_print_xnode (file, node, indent)
- FILE *file UNUSED;
- tree node UNUSED;
- int indent UNUSED;
-{
-}
-
static void
ffe_finish ()
{
return block;
}
-void
-print_lang_decl (file, node, indent)
- FILE *file UNUSED;
- tree node UNUSED;
- int indent UNUSED;
-{
-}
-
-void
-print_lang_identifier (file, node, indent)
+static void
+ffe_print_identifier (file, node, indent)
FILE *file;
tree node;
int indent;
print_node (file, "local", IDENTIFIER_LOCAL_VALUE (node), indent + 4);
}
-void
-print_lang_statistics ()
-{
-}
-
-void
-print_lang_type (file, node, indent)
- FILE *file UNUSED;
- tree node UNUSED;
- int indent UNUSED;
-{
-}
-
/* Record a decl-node X as belonging to the current lexical scope.
Check for errors (such as an incompatible declaration for the same
name already seen in the same scope).
BLOCK_SUBBLOCKS (block));
}
-/* ~~gcc/tree.h *should* declare this, because toplev.c references it. */
-
-/* Can't 'yydebug' a front end not generated by yacc/bison! */
-
-void
-set_yydebug (value)
- int value;
-{
- if (value)
- fprintf (stderr, "warning: no yacc/bison-generated output to debug!\n");
-}
-
tree
signed_or_unsigned_type (unsignedp, type)
int unsignedp;
2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
+ * java-tree.h (java_set_yydebug): New.
+ * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
+ * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
+ (print_lang_decl, print_lang_type, print_lang_identifier,
+ print_lang_statistics, lang_print_xnode): Remove.
+
+2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
+
* jcf-parse.c (init_lex): Remove.
* lang.c (language_string, lang_identify): Remove.
(struct lang_hooks): Constify.
#define JCF_u4 unsigned long
#define JCF_u2 unsigned short
+extern void java_set_yydebug PARAMS ((int));
extern void add_assume_compiled PARAMS ((const char *, int));
extern tree lookup_class PARAMS ((tree));
extern tree lookup_java_constructor PARAMS ((tree, tree));
}
void
-set_yydebug (value)
+java_set_yydebug (value)
int value;
{
yydebug = value;
#define LANG_HOOKS_INIT_OPTIONS java_init_options
#undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION java_decode_option
+#undef LANG_HOOKS_SET_YYDEBUG
+#define LANG_HOOKS_SET_YYDEBUG java_set_yydebug
/* Each front end provides its own. */
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
flag_exceptions = 1;
flag_non_call_exceptions = 1;
}
-
-/* Hooks for print_node. */
-
-void
-print_lang_decl (file, node, indent)
- FILE *file __attribute ((__unused__));
- tree node __attribute ((__unused__));
- int indent __attribute ((__unused__));
-{
-}
-
-void
-print_lang_type (file, node, indent)
- FILE *file __attribute ((__unused__));
- tree node __attribute ((__unused__));
- int indent __attribute ((__unused__));
-{
-}
-
-void
-print_lang_identifier (file, node, indent)
- FILE *file __attribute ((__unused__));
- tree node __attribute ((__unused__));
- int indent __attribute ((__unused__));
-{
-}
-
-void
-print_lang_statistics ()
-{
-}
-
-/* used by print-tree.c */
-
-void
-lang_print_xnode (file, node, indent)
- FILE *file __attribute ((__unused__));
- tree node __attribute ((__unused__));
- int indent __attribute ((__unused__));
-{
-}
extern int lhd_decode_option PARAMS ((int, char **));
extern HOST_WIDE_INT lhd_get_alias_set PARAMS ((tree));
extern void lhd_clear_binding_stack PARAMS ((void));
+extern void lhd_print_tree_nothing PARAMS ((FILE *, tree, int));
+extern void lhd_set_yydebug PARAMS ((int));
/* Declarations of default tree inlining hooks. */
tree lhd_tree_inlining_walk_subtrees PARAMS ((tree *, int *,
#define LANG_HOOKS_POST_OPTIONS lhd_do_nothing
#define LANG_HOOKS_GET_ALIAS_SET lhd_get_alias_set
#define LANG_HOOKS_HONOR_READONLY false
+#define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing
+#define LANG_HOOKS_PRINT_XNODE lhd_print_tree_nothing
+#define LANG_HOOKS_PRINT_DECL lhd_print_tree_nothing
+#define LANG_HOOKS_PRINT_TYPE lhd_print_tree_nothing
+#define LANG_HOOKS_PRINT_IDENTIFIER lhd_print_tree_nothing
+#define LANG_HOOKS_SET_YYDEBUG lhd_set_yydebug
/* Tree inlining hooks. */
#define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES lhd_tree_inlining_walk_subtrees
LANG_HOOKS_POST_OPTIONS, \
LANG_HOOKS_GET_ALIAS_SET, \
LANG_HOOKS_HONOR_READONLY, \
+ LANG_HOOKS_PRINT_STATISTICS, \
+ LANG_HOOKS_PRINT_XNODE, \
+ LANG_HOOKS_PRINT_DECL, \
+ LANG_HOOKS_PRINT_TYPE, \
+ LANG_HOOKS_PRINT_IDENTIFIER, \
+ LANG_HOOKS_SET_YYDEBUG, \
LANG_HOOKS_TREE_INLINING_INITIALIZER \
}
return 0;
}
+/* Called from by print-tree.c. */
+
+void
+lhd_print_tree_nothing (file, node, indent)
+ FILE *file ATTRIBUTE_UNUSED;
+ tree node ATTRIBUTE_UNUSED;
+ int indent ATTRIBUTE_UNUSED;
+{
+}
+
+/* Called when -dy is given on the command line. */
+
+void
+lhd_set_yydebug (value)
+ int value;
+{
+ if (value)
+ fprintf (stderr, "warning: no yacc/bison-generated output to debug!\n");
+}
+
/* Provide a default routine to clear the binding stack. This is used
by languages that don't need to do anything special. */
void
#ifndef GCC_LANG_HOOKS_H
#define GCC_LANG_HOOKS_H
+/* A print hook for print_tree (). */
+typedef void (*lang_print_tree_hook) PARAMS ((FILE *, tree, int indent));
+
/* The following hooks are documented in langhooks.c. Must not be
NULL. */
/* Nonzero if TYPE_READONLY and TREE_READONLY should always be honored. */
bool honor_readonly;
+ /* The front end can add its own statistics to -fmem-report with
+ this hook. It should output to stderr. */
+ void (*print_statistics) PARAMS ((void));
+
+ /* Called by print_tree when there is a tree of class 'x' that it
+ doesn't know how to display. */
+ lang_print_tree_hook print_xnode;
+
+ /* Called to print language-dependent parts of a class 'd', class
+ 't', and IDENTIFIER_NODE nodes. */
+ lang_print_tree_hook print_decl;
+ lang_print_tree_hook print_type;
+ lang_print_tree_hook print_identifier;
+
+ /* Set yydebug for bison-based parsers, when -dy is given on the
+ command line. By default, if the parameter is non-zero, prints a
+ warning that the front end does not use such a parser. */
+ void (*set_yydebug) PARAMS ((int));
+
struct lang_hooks_for_tree_inlining tree_inlining;
/* Whenever you add entries here, make sure you adjust langhooks.h
#define LANG_HOOKS_DECODE_OPTION objc_decode_option
#undef LANG_HOOKS_POST_OPTIONS
#define LANG_HOOKS_POST_OPTIONS objc_post_options
+#undef LANG_HOOKS_PRINT_IDENTIFIER
+#define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier
+#undef LANG_HOOKS_SET_YYDEBUG
+#define LANG_HOOKS_SET_YYDEBUG c_set_yydebug
/* Each front end provides its own. */
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
return 1;
}
-/* used by print-tree.c */
-
-void
-lang_print_xnode (file, node, indent)
- FILE *file ATTRIBUTE_UNUSED;
- tree node ATTRIBUTE_UNUSED;
- int indent ATTRIBUTE_UNUSED;
-{
-}
-
\f
static tree
define_decl (declarator, declspecs)
assemble_zeros (UNITS_PER_WORD);
}
\f
-void
-print_lang_statistics ()
-{
-}
-
static void
ggc_mark_imp_list (arg)
void *arg;
#include "system.h"
#include "tree.h"
#include "ggc.h"
+#include "langhooks.h"
/* Define the hash table of nodes already seen.
Such nodes are not repeated; brief cross-references are used. */
print_node (file, "result", DECL_RESULT_FLD (node), indent + 4);
print_node_brief (file, "initial", DECL_INITIAL (node), indent + 4);
- print_lang_decl (file, node, indent);
+ (*lang_hooks.print_decl) (file, node, indent);
if (DECL_RTL_SET_P (node))
{
if (TYPE_CONTEXT (node))
print_node_brief (file, "context", TYPE_CONTEXT (node), indent + 4);
- print_lang_type (file, node, indent);
+ (*lang_hooks.print_type) (file, node, indent);
if (TYPE_POINTER_TO (node) || TREE_CHAIN (node))
indent_to (file, indent + 3);
break;
case IDENTIFIER_NODE:
- print_lang_identifier (file, node, indent);
+ (*lang_hooks.print_identifier) (file, node, indent);
break;
case TREE_LIST:
default:
if (TREE_CODE_CLASS (TREE_CODE (node)) == 'x')
- lang_print_xnode (file, node, indent);
+ (*lang_hooks.print_xnode) (file, node, indent);
break;
}
rtl_dump_and_exit = 1;
break;
case 'y':
- set_yydebug (1);
+ (*lang_hooks.set_yydebug) (1);
break;
case 'D': /* These are handled by the preprocessor. */
case 'I':
#include "hashtab.h"
#include "output.h"
#include "target.h"
+#include "langhooks.h"
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
#endif
print_obstack_statistics ("permanent_obstack", &permanent_obstack);
print_type_hash_statistics ();
- print_lang_statistics ();
+ (*lang_hooks.print_statistics) ();
}
\f
#define FILE_FUNCTION_PREFIX_LEN 9
extern int mark_addressable PARAMS ((tree));
extern void incomplete_type_error PARAMS ((tree, tree));
-extern void print_lang_statistics PARAMS ((void));
extern tree truthvalue_conversion PARAMS ((tree));
-#ifdef BUFSIZ
-extern void print_lang_decl PARAMS ((FILE *, tree, int));
-extern void print_lang_type PARAMS ((FILE *, tree, int));
-extern void print_lang_identifier PARAMS ((FILE *, tree, int));
-#endif
extern int global_bindings_p PARAMS ((void));
extern void insert_block PARAMS ((tree));
extern void output_inline_function PARAMS ((tree));
extern void set_decl_origin_self PARAMS ((tree));
-/* In front end. */
-extern void set_yydebug PARAMS ((int));
-
/* In stor-layout.c */
extern void fixup_signed_type PARAMS ((tree));
extern void internal_reference_types PARAMS ((void));
extern HOST_WIDE_INT all_cases_count PARAMS ((tree, int *));
extern void check_for_full_enumeration_handling PARAMS ((tree));
extern void declare_nonlocal_label PARAMS ((tree));
-#ifdef BUFSIZ
-extern void lang_print_xnode PARAMS ((FILE *, tree, int));
-#endif
-
/* If KIND=='I', return a suitable global initializer (constructor) name.
If KIND=='D', return a suitable global clean-up (destructor) name. */