Makefile.in: Update.

* 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.
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.

From-SVN: r46907
This commit is contained in:
Neil Booth 2001-11-09 23:30:44 +00:00 committed by Neil Booth
parent 1ee9fb202a
commit 5d69f816bc
28 changed files with 187 additions and 199 deletions

View File

@ -1,3 +1,32 @@
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

View File

@ -1349,12 +1349,13 @@ convert.o: convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h convert.h toplev.
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 \

View File

@ -1,3 +1,10 @@
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.

View File

@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
* $Revision: 1.9 $
* $Revision: 1.10 $
* *
* Copyright (C) 1992-2001 Free Software Foundation, Inc. *
* *
@ -113,6 +113,8 @@ static void gnat_init PARAMS ((void));
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. */
@ -130,6 +132,10 @@ static HOST_WIDE_INT gnat_get_alias_set PARAMS ((tree));
#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;
@ -372,20 +378,6 @@ maybe_build_cleanup (decl)
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. */
@ -397,8 +389,8 @@ copy_lang_decl (node)
/* 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;
@ -420,8 +412,8 @@ print_lang_decl (file, node, indent)
}
}
void
print_lang_type (file, node, indent)
static void
gnat_print_type (file, node, indent)
FILE *file;
tree node;
int indent;
@ -472,13 +464,6 @@ print_lang_type (file, node, 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. */
@ -900,14 +885,6 @@ finish_parse ()
{
}
/* 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. */

View File

@ -789,26 +789,8 @@ c_decode_option (argc, argv)
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;

View File

@ -61,6 +61,10 @@ static int c_cannot_inline_tree_fn PARAMS ((tree *));
#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 \
@ -134,21 +138,6 @@ c_init ()
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

View File

@ -3784,7 +3784,7 @@ yylex()
in order to build the compiler. */
void
set_yydebug (value)
c_set_yydebug (value)
int value;
{
#if YYDEBUG != 0

View File

@ -155,12 +155,14 @@ extern tree lookup_objc_ivar PARAMS ((tree));
/* 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));

View File

@ -1,3 +1,16 @@
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.

View File

@ -45,6 +45,18 @@ static HOST_WIDE_INT cxx_get_alias_set PARAMS ((tree));
#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 \

View File

@ -3530,7 +3530,12 @@ extern int current_lang_depth PARAMS ((void));
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));

View File

@ -907,7 +907,7 @@ print_parse_statistics ()
in order to build the compiler. */
void
set_yydebug (value)
cxx_set_yydebug (value)
int value;
{
#if YYDEBUG != 0

View File

@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */
#include "cp-tree.h"
void
print_lang_decl (file, node, indent)
cxx_print_decl (file, node, indent)
FILE *file;
tree node;
int indent;
@ -66,7 +66,7 @@ print_lang_decl (file, node, indent)
}
void
print_lang_type (file, node, indent)
cxx_print_type (file, node, indent)
FILE *file;
register tree node;
int indent;
@ -158,7 +158,7 @@ print_lang_type (file, node, indent)
}
void
print_lang_identifier (file, node, indent)
cxx_print_identifier (file, node, indent)
FILE *file;
tree node;
int indent;
@ -173,7 +173,7 @@ print_lang_identifier (file, node, indent)
}
void
lang_print_xnode (file, node, indent)
cxx_print_xnode (file, node, indent)
FILE *file;
tree node;
int indent;

View File

@ -1276,7 +1276,7 @@ extern int depth_reached;
#endif
void
print_lang_statistics ()
cxx_print_statistics ()
{
print_search_statistics ();
print_class_statistics ();

View File

@ -1,3 +1,10 @@
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

View File

@ -14256,6 +14256,7 @@ insert_block (block)
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"
@ -14267,6 +14268,8 @@ static void ffe_init_options PARAMS ((void));
#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
@ -14278,16 +14281,6 @@ static void ffe_init_options PARAMS ((void));
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 ()
{
@ -14542,16 +14535,8 @@ poplevel (keep, reverse, functionbody)
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;
@ -14560,19 +14545,6 @@ print_lang_identifier (file, node, 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).
@ -14762,18 +14734,6 @@ set_block (block)
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;

View File

@ -1,3 +1,11 @@
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.

View File

@ -996,6 +996,7 @@ struct lang_type
#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));

View File

@ -262,7 +262,7 @@ parse_signature (jcf, sig_index)
}
void
set_yydebug (value)
java_set_yydebug (value)
int value;
{
yydebug = value;

View File

@ -203,6 +203,8 @@ static int dependency_tracking = 0;
#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;
@ -741,44 +743,3 @@ java_init_options ()
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__));
{
}

View File

@ -41,6 +41,8 @@ extern void lhd_do_nothing PARAMS ((void));
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 *,
@ -66,6 +68,12 @@ int lhd_tree_inlining_anon_aggr_type_p PARAMS ((tree));
#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
@ -107,6 +115,12 @@ int lhd_tree_inlining_anon_aggr_type_p PARAMS ((tree));
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 \
}

View File

@ -47,6 +47,26 @@ lhd_decode_option (argc, argv)
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

View File

@ -21,6 +21,9 @@ Boston, MA 02111-1307, USA. */
#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. */
@ -88,6 +91,25 @@ struct lang_hooks
/* 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

View File

@ -461,6 +461,10 @@ static int print_struct_values = 0;
#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;
@ -640,16 +644,6 @@ objc_decode_option (argc, argv)
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;
{
}
static tree
define_decl (declarator, declspecs)
@ -8333,11 +8327,6 @@ handle_impent (impent)
assemble_zeros (UNITS_PER_WORD);
}
void
print_lang_statistics ()
{
}
static void
ggc_mark_imp_list (arg)
void *arg;

View File

@ -24,6 +24,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#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. */
@ -442,7 +443,7 @@ print_node (file, prefix, node, indent)
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))
{
@ -574,7 +575,7 @@ print_node (file, prefix, node, indent)
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);
@ -719,7 +720,7 @@ print_node (file, prefix, node, indent)
break;
case IDENTIFIER_NODE:
print_lang_identifier (file, node, indent);
(*lang_hooks.print_identifier) (file, node, indent);
break;
case TREE_LIST:
@ -742,7 +743,7 @@ print_node (file, prefix, node, indent)
default:
if (TREE_CODE_CLASS (TREE_CODE (node)) == 'x')
lang_print_xnode (file, node, indent);
(*lang_hooks.print_xnode) (file, node, indent);
break;
}

View File

@ -4045,7 +4045,7 @@ decode_d_option (arg)
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':

View File

@ -45,6 +45,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "hashtab.h"
#include "output.h"
#include "target.h"
#include "langhooks.h"
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
@ -4424,7 +4425,7 @@ dump_tree_statistics ()
#endif
print_obstack_statistics ("permanent_obstack", &permanent_obstack);
print_type_hash_statistics ();
print_lang_statistics ();
(*lang_hooks.print_statistics) ();
}
#define FILE_FUNCTION_PREFIX_LEN 9

View File

@ -2956,13 +2956,7 @@ extern int lang_attribute_common;
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));
@ -2972,9 +2966,6 @@ extern void set_decl_abstract_flags PARAMS ((tree, int));
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));
@ -3022,10 +3013,6 @@ extern tree case_index_expr_type 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. */