Makefile.in: Update.
* Makefile.in: Update. * c-common.c: Include langhooks.h. (inline_forbidden_p): Use new hook. * diagnostic.c: Include langhooks.h. (format_with_decl, announce_function, default_print_error_function): Use new hook. * dwarf2out.c (dwarf2_name): Use new hook. * function.c: Include langhooks.h. (init_function_start): Use new hook. * langhooks-def.h (lhd_decl_printable_name): New. (LANGHOOKS_DECL_PRINTABLE_NAME): New. (LANGHOOKS_INITIALIZER): Update. * langhooks.c (lhd_decl_printable_name): New. * langhooks.h (struct lang_hooks): New hook. * toplev.c (decl_name, decl_printable_name): Remove. (open_dump_file): Use new hook. (process_options): Remove old hook. * tree.h (decl_printable_name): Remove. ada: * misc.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (gnat_init): Remove old hook. cp: * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. * cp-tree.h (lang_printable_name): Rename. * error.c (lang_decl_name): Use new hook. * lex.c (cxx_init): Remove old hook. * pt.c (tsubst_expr): Use new hook. * tree.c (lang_printable_name): Rename. f: * com.c (lang_printable_name): Rename. (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (ffe_init): Don't use old hook. java: * decl.c (start_java_method): Use new hook. * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (java_init): Remove old hook. objc: * objc-act.c (objc_init): Remove old hook. (objc_printable_name): Export. * objc-act.h (objc_printable_name): New. * objc-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. From-SVN: r51066
This commit is contained in:
parent
f78ce0b72f
commit
7afff7cfb0
@ -1,3 +1,29 @@
|
||||
2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* Makefile.in: Update.
|
||||
* c-common.c: Include langhooks.h.
|
||||
(inline_forbidden_p): Use new hook.
|
||||
* diagnostic.c: Include langhooks.h.
|
||||
(format_with_decl, announce_function,
|
||||
default_print_error_function): Use new hook.
|
||||
* dwarf2out.c (dwarf2_name): Use new hook.
|
||||
* function.c: Include langhooks.h.
|
||||
(init_function_start): Use new hook.
|
||||
* langhooks-def.h (lhd_decl_printable_name): New.
|
||||
(LANGHOOKS_DECL_PRINTABLE_NAME): New.
|
||||
(LANGHOOKS_INITIALIZER): Update.
|
||||
* langhooks.c (lhd_decl_printable_name): New.
|
||||
* langhooks.h (struct lang_hooks): New hook.
|
||||
* toplev.c (decl_name, decl_printable_name): Remove.
|
||||
(open_dump_file): Use new hook.
|
||||
(process_options): Remove old hook.
|
||||
* tree.h (decl_printable_name): Remove.
|
||||
objc:
|
||||
* objc-act.c (objc_init): Remove old hook.
|
||||
(objc_printable_name): Export.
|
||||
* objc-act.h (objc_printable_name): New.
|
||||
* objc-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
|
||||
|
||||
2002-03-19 Jim Blandy <jimb@redhat.com>
|
||||
|
||||
* c-lex.c (cb_file_change): Pass the #inclusion's line number to
|
||||
|
@ -1157,7 +1157,7 @@ c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) c-lex.h \
|
||||
c-objc-common.o : c-objc-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
|
||||
$(C_TREE_H) $(RTL_H) insn-config.h integrate.h $(EXPR_H) $(C_TREE_H) \
|
||||
flags.h toplev.h tree-inline.h diagnostic.h integrate.h $(VARRAY_H) \
|
||||
$(GGC_H)
|
||||
langhooks.h $(GGC_H)
|
||||
c-aux-info.o : c-aux-info.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
|
||||
flags.h toplev.h
|
||||
c-convert.o : c-convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h toplev.h
|
||||
@ -1340,7 +1340,7 @@ fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \
|
||||
toplev.h $(HASHTAB_H) $(EXPR_H) $(RTL_H) $(GGC_H) $(TM_P_H)
|
||||
diagnostic.o : diagnostic.c diagnostic.h real.h diagnostic.def \
|
||||
$(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_P_H) flags.h $(GGC_H) \
|
||||
input.h toplev.h intl.h
|
||||
input.h toplev.h intl.h langhooks.h
|
||||
toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) function.h \
|
||||
flags.h xcoffout.h input.h $(INSN_ATTR_H) output.h diagnostic.h \
|
||||
debug.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h \
|
||||
@ -1375,7 +1375,8 @@ varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
|
||||
$(HASHTAB_H) $(TARGET_H) langhooks.h
|
||||
function.o : function.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
|
||||
function.h $(EXPR_H) libfuncs.h $(REGS_H) hard-reg-set.h \
|
||||
insn-config.h $(RECOG_H) output.h toplev.h except.h hash.h $(GGC_H) $(TM_P_H)
|
||||
insn-config.h $(RECOG_H) output.h toplev.h except.h hash.h $(GGC_H) \
|
||||
$(TM_P_H) langhooks.h
|
||||
stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h \
|
||||
insn-config.h hard-reg-set.h $(EXPR_H) libfuncs.h except.h \
|
||||
$(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* misc.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
|
||||
(gnat_init): Remove old hook.
|
||||
|
||||
2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* misc.c (LANG_HOOKS_PARSE_FILE): Redefine.
|
||||
|
@ -109,6 +109,8 @@ static void gnat_parse_file PARAMS ((void));
|
||||
#define LANG_HOOKS_PRINT_DECL gnat_print_decl
|
||||
#undef LANG_HOOKS_PRINT_TYPE
|
||||
#define LANG_HOOKS_PRINT_TYPE gnat_print_type
|
||||
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
|
||||
#define LANG_HOOKS_DECL_PRINTABLE_NAME gnat_printable_name
|
||||
|
||||
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
|
||||
|
||||
@ -358,7 +360,6 @@ gnat_init (filename)
|
||||
it, but it's where g++ does it. */
|
||||
|
||||
lang_expand_expr = gnat_expand_expr;
|
||||
decl_printable_name = gnat_printable_name;
|
||||
|
||||
gnat_init_decl_processing ();
|
||||
|
||||
|
@ -37,6 +37,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#include "c-lex.h"
|
||||
#include "cpplib.h"
|
||||
#include "target.h"
|
||||
#include "langhooks.h"
|
||||
cpp_reader *parse_in; /* Declared in c-lex.h. */
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
@ -483,7 +484,7 @@ fname_as_string (pretty_p)
|
||||
|
||||
if (pretty_p)
|
||||
name = (current_function_decl
|
||||
? (*decl_printable_name) (current_function_decl, 2)
|
||||
? (*lang_hooks.decl_printable_name) (current_function_decl, 2)
|
||||
: "top level");
|
||||
else if (current_function_decl && DECL_NAME (current_function_decl))
|
||||
name = IDENTIFIER_POINTER (DECL_NAME (current_function_decl));
|
||||
|
@ -33,6 +33,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#include "tree-inline.h"
|
||||
#include "varray.h"
|
||||
#include "ggc.h"
|
||||
#include "langhooks.h"
|
||||
|
||||
static int c_tree_printer PARAMS ((output_buffer *));
|
||||
static tree inline_forbidden_p PARAMS ((tree *, int *, void *));
|
||||
@ -392,7 +393,7 @@ c_tree_printer (buffer)
|
||||
case 'T':
|
||||
{
|
||||
const char *n = DECL_NAME (t)
|
||||
? (*decl_printable_name) (t, 2)
|
||||
? (*lang_hooks.decl_printable_name) (t, 2)
|
||||
: "({anonymous})";
|
||||
output_add_string (buffer, n);
|
||||
}
|
||||
|
@ -1,3 +1,12 @@
|
||||
2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
|
||||
* cp-tree.h (lang_printable_name): Rename.
|
||||
* error.c (lang_decl_name): Use new hook.
|
||||
* lex.c (cxx_init): Remove old hook.
|
||||
* pt.c (tsubst_decl): Use new hook.
|
||||
* tree.c (lang_printable_name): Rename.
|
||||
|
||||
2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
|
||||
|
||||
PR c++/3882
|
||||
|
@ -67,6 +67,8 @@ static bool ok_to_generate_alias_set_for_type PARAMS ((tree));
|
||||
#define LANG_HOOKS_PRINT_TYPE cxx_print_type
|
||||
#undef LANG_HOOKS_PRINT_IDENTIFIER
|
||||
#define LANG_HOOKS_PRINT_IDENTIFIER cxx_print_identifier
|
||||
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
|
||||
#define LANG_HOOKS_DECL_PRINTABLE_NAME cxx_printable_name
|
||||
#undef LANG_HOOKS_SET_YYDEBUG
|
||||
#define LANG_HOOKS_SET_YYDEBUG cxx_set_yydebug
|
||||
|
||||
|
@ -4263,7 +4263,7 @@ extern tree build_overload PARAMS ((tree, tree));
|
||||
extern tree function_arg_chain PARAMS ((tree));
|
||||
extern int promotes_to_aggr_type PARAMS ((tree, enum tree_code));
|
||||
extern int is_aggr_type_2 PARAMS ((tree, tree));
|
||||
extern const char *lang_printable_name PARAMS ((tree, int));
|
||||
extern const char *cxx_printable_name PARAMS ((tree, int));
|
||||
extern tree build_exception_variant PARAMS ((tree, tree));
|
||||
extern tree bind_template_template_parm PARAMS ((tree, tree));
|
||||
extern tree array_type_nelts_total PARAMS ((tree));
|
||||
|
@ -2132,7 +2132,7 @@ context_as_string (context, flags)
|
||||
return output_finalize_message (scratch_buffer);
|
||||
}
|
||||
|
||||
/* Generate the three forms of printable names for lang_printable_name. */
|
||||
/* Generate the three forms of printable names for cxx_printable_name. */
|
||||
|
||||
const char *
|
||||
lang_decl_name (decl, v)
|
||||
@ -2436,7 +2436,7 @@ cp_print_error_function (buffer, dc)
|
||||
else
|
||||
output_printf
|
||||
(buffer, "In %s `%s':", function_category (current_function_decl),
|
||||
(*decl_printable_name) (current_function_decl, 2));
|
||||
cxx_printable_name (current_function_decl, 2));
|
||||
output_add_newline (buffer);
|
||||
|
||||
record_last_error_function ();
|
||||
|
@ -642,7 +642,6 @@ const char *
|
||||
cxx_init (filename)
|
||||
const char *filename;
|
||||
{
|
||||
decl_printable_name = lang_printable_name;
|
||||
input_filename = "<internal>";
|
||||
|
||||
init_reswords ();
|
||||
|
@ -7364,7 +7364,7 @@ tsubst_expr (t, args, complain, in_decl)
|
||||
/* For __PRETTY_FUNCTION__ we have to adjust the
|
||||
initializer. */
|
||||
const char *const name
|
||||
= (*decl_printable_name) (current_function_decl, 2);
|
||||
= cxx_printable_name (current_function_decl, 2);
|
||||
init = cp_fname_init (name);
|
||||
TREE_TYPE (decl) = TREE_TYPE (init);
|
||||
}
|
||||
|
@ -1049,7 +1049,7 @@ cp_statement_code_p (code)
|
||||
#define PRINT_RING_SIZE 4
|
||||
|
||||
const char *
|
||||
lang_printable_name (decl, v)
|
||||
cxx_printable_name (decl, v)
|
||||
tree decl;
|
||||
int v;
|
||||
{
|
||||
|
@ -34,6 +34,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#include "toplev.h"
|
||||
#include "intl.h"
|
||||
#include "diagnostic.h"
|
||||
#include "langhooks.h"
|
||||
|
||||
#define obstack_chunk_alloc xmalloc
|
||||
#define obstack_chunk_free free
|
||||
@ -867,7 +868,7 @@ format_with_decl (buffer, decl)
|
||||
if (*p == '%') /* Print the name. */
|
||||
{
|
||||
const char *const n = (DECL_NAME (decl)
|
||||
? (*decl_printable_name) (decl, 2)
|
||||
? (*lang_hooks.decl_printable_name) (decl, 2)
|
||||
: _("((anonymous))"));
|
||||
output_add_string (buffer, n);
|
||||
while (*p)
|
||||
@ -1075,7 +1076,7 @@ announce_function (decl)
|
||||
if (rtl_dump_and_exit)
|
||||
verbatim ("%s ", IDENTIFIER_POINTER (DECL_NAME (decl)));
|
||||
else
|
||||
verbatim (" %s", (*decl_printable_name) (decl, 2));
|
||||
verbatim (" %s", (*lang_hooks.decl_printable_name) (decl, 2));
|
||||
fflush (stderr);
|
||||
output_needs_newline (diagnostic_buffer) = 1;
|
||||
record_last_error_function ();
|
||||
@ -1105,11 +1106,11 @@ default_print_error_function (context, file)
|
||||
if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)
|
||||
output_printf
|
||||
((output_buffer *) context, "In member function `%s':",
|
||||
(*decl_printable_name) (current_function_decl, 2));
|
||||
(*lang_hooks.decl_printable_name) (current_function_decl, 2));
|
||||
else
|
||||
output_printf
|
||||
((output_buffer *) context, "In function `%s':",
|
||||
(*decl_printable_name) (current_function_decl, 2));
|
||||
(*lang_hooks.decl_printable_name) (current_function_decl, 2));
|
||||
}
|
||||
output_add_newline ((output_buffer *) context);
|
||||
|
||||
|
@ -6493,16 +6493,16 @@ output_comp_unit (die)
|
||||
unmark_dies (die);
|
||||
}
|
||||
|
||||
/* The DWARF2 pubname for a nested thingy looks like "A::f". The output
|
||||
of decl_printable_name for C++ looks like "A::f(int)". Let's drop the
|
||||
argument list, and maybe the scope. */
|
||||
/* The DWARF2 pubname for a nested thingy looks like "A::f". The
|
||||
output of lang_hooks.decl_printable_name for C++ looks like
|
||||
"A::f(int)". Let's drop the argument list, and maybe the scope. */
|
||||
|
||||
static const char *
|
||||
dwarf2_name (decl, scope)
|
||||
tree decl;
|
||||
int scope;
|
||||
{
|
||||
return (*decl_printable_name) (decl, scope ? 1 : 0);
|
||||
return (*lang_hooks.decl_printable_name) (decl, scope ? 1 : 0);
|
||||
}
|
||||
|
||||
/* Add a new entry to .debug_pubnames if appropriate. */
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Mar 20 08:03:42 2002 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* com.c (lang_printable_name): Rename.
|
||||
(LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
|
||||
(ffe_init): Don't use old hook.
|
||||
|
||||
Sun Mar 17 18:50:15 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* com.h (ffe_parse_file): Prototype.
|
||||
|
@ -364,7 +364,7 @@ static void delete_block (tree block);
|
||||
static int duplicate_decls (tree newdecl, tree olddecl);
|
||||
static void finish_decl (tree decl, tree init, bool is_top_level);
|
||||
static void finish_function (int nested);
|
||||
static const char *lang_printable_name (tree decl, int v);
|
||||
static const char *ffe_printable_name (tree decl, int v);
|
||||
static tree lookup_name_current_level (tree name);
|
||||
static struct binding_level *make_binding_level (void);
|
||||
static void pop_f_function_context (void);
|
||||
@ -13630,7 +13630,7 @@ finish_function (int nested)
|
||||
nested function and all). */
|
||||
|
||||
static const char *
|
||||
lang_printable_name (tree decl, int v)
|
||||
ffe_printable_name (tree decl, int v)
|
||||
{
|
||||
/* Just to keep GCC quiet about the unused variable.
|
||||
In theory, differing values of V should produce different
|
||||
@ -14215,6 +14215,8 @@ static void ffe_print_identifier PARAMS ((FILE *, tree, int));
|
||||
#define LANG_HOOKS_PARSE_FILE ffe_parse_file
|
||||
#undef LANG_HOOKS_PRINT_IDENTIFIER
|
||||
#define LANG_HOOKS_PRINT_IDENTIFIER ffe_print_identifier
|
||||
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
|
||||
#define LANG_HOOKS_DECL_PRINTABLE_NAME ffe_printable_name
|
||||
|
||||
/* 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
|
||||
@ -14277,7 +14279,6 @@ ffe_init (filename)
|
||||
#endif
|
||||
|
||||
ffecom_init_decl_processing ();
|
||||
decl_printable_name = lang_printable_name;
|
||||
print_error_function = lang_print_error_function;
|
||||
|
||||
/* If the file is output from cpp, it should contain a first line
|
||||
|
@ -59,6 +59,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#include "ggc.h"
|
||||
#include "tm_p.h"
|
||||
#include "integrate.h"
|
||||
#include "langhooks.h"
|
||||
|
||||
#ifndef TRAMPOLINE_ALIGNMENT
|
||||
#define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
|
||||
@ -6259,7 +6260,7 @@ init_function_start (subr, filename, line)
|
||||
{
|
||||
prepare_function_start ();
|
||||
|
||||
current_function_name = (*decl_printable_name) (subr, 2);
|
||||
current_function_name = (*lang_hooks.decl_printable_name) (subr, 2);
|
||||
cfun->decl = subr;
|
||||
|
||||
/* Nonzero if this is a nested function that uses a static chain. */
|
||||
|
@ -1,3 +1,9 @@
|
||||
2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* decl.c (start_java_method): Use new hook.
|
||||
* lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
|
||||
(java_init): Remove old hook.
|
||||
|
||||
2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
|
||||
|
||||
* builtins.c (define_builtin): Do nothing if `type' is null.
|
||||
|
@ -1775,7 +1775,7 @@ start_java_method (fndecl)
|
||||
type_map = (tree *) xrealloc (type_map, i * sizeof (tree));
|
||||
|
||||
#if defined(DEBUG_JAVA_BINDING_LEVELS)
|
||||
fprintf (stderr, "%s:\n", (*decl_printable_name) (fndecl, 2));
|
||||
fprintf (stderr, "%s:\n", lang_printable_name (fndecl, 2));
|
||||
current_pc = 0;
|
||||
#endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */
|
||||
pushlevel (1); /* Push parameters. */
|
||||
|
@ -225,6 +225,8 @@ static int dependency_tracking = 0;
|
||||
#define LANG_HOOKS_PARSE_FILE java_parse_file
|
||||
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
|
||||
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl
|
||||
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
|
||||
#define LANG_HOOKS_DECL_PRINTABLE_NAME lang_printable_name
|
||||
|
||||
/* Each front end provides its own. */
|
||||
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
|
||||
@ -506,7 +508,6 @@ java_init (filename)
|
||||
jcf_path_init ();
|
||||
jcf_path_seal (version_flag);
|
||||
|
||||
decl_printable_name = lang_printable_name;
|
||||
print_error_function = lang_print_error;
|
||||
lang_expand_expr = java_lang_expand_expr;
|
||||
|
||||
|
@ -46,6 +46,7 @@ extern int lhd_safe_from_p PARAMS ((rtx, tree));
|
||||
extern int lhd_staticp PARAMS ((tree));
|
||||
extern void lhd_clear_binding_stack PARAMS ((void));
|
||||
extern void lhd_print_tree_nothing PARAMS ((FILE *, tree, int));
|
||||
extern const char *lhd_decl_printable_name PARAMS ((tree, int));
|
||||
extern void lhd_set_yydebug PARAMS ((int));
|
||||
|
||||
/* Declarations of default tree inlining hooks. */
|
||||
@ -86,6 +87,7 @@ tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree));
|
||||
#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_DECL_PRINTABLE_NAME lhd_decl_printable_name
|
||||
#define LANG_HOOKS_SET_YYDEBUG lhd_set_yydebug
|
||||
|
||||
/* Tree inlining hooks. */
|
||||
@ -160,6 +162,7 @@ int lhd_tree_dump_type_quals PARAMS ((tree));
|
||||
LANG_HOOKS_PRINT_DECL, \
|
||||
LANG_HOOKS_PRINT_TYPE, \
|
||||
LANG_HOOKS_PRINT_IDENTIFIER, \
|
||||
LANG_HOOKS_DECL_PRINTABLE_NAME, \
|
||||
LANG_HOOKS_SET_YYDEBUG, \
|
||||
LANG_HOOKS_TREE_INLINING_INITIALIZER, \
|
||||
LANG_HOOKS_TREE_DUMP_INITIALIZER \
|
||||
|
@ -134,6 +134,16 @@ hook_get_alias_set_0 (t)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This is the default decl_printable_name function. */
|
||||
|
||||
const char *
|
||||
lhd_decl_printable_name (decl, verbosity)
|
||||
tree decl;
|
||||
int verbosity ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return IDENTIFIER_POINTER (DECL_NAME (decl));
|
||||
}
|
||||
|
||||
/* lang_hooks.tree_inlining.walk_subtrees is called by walk_tree()
|
||||
after handling common cases, but before walking code-specific
|
||||
sub-trees. If this hook is overridden for a language, it should
|
||||
|
@ -160,6 +160,14 @@ struct lang_hooks
|
||||
lang_print_tree_hook print_type;
|
||||
lang_print_tree_hook print_identifier;
|
||||
|
||||
/* Computes the name to use to print a declaration. DECL is the
|
||||
non-NULL declaration in question. VERBOSITY determines what
|
||||
information will be printed: 0: DECL_NAME, demangled as
|
||||
necessary. 1: and scope information. 2: and any other
|
||||
information that might be interesting, such as function parameter
|
||||
types in C++. */
|
||||
const char *(*decl_printable_name) PARAMS ((tree decl, int verbosity));
|
||||
|
||||
/* 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. */
|
||||
|
@ -165,7 +165,6 @@ static int check_methods_accessible PARAMS ((tree, tree,
|
||||
static void encode_aggregate_within PARAMS ((tree, int, int,
|
||||
int, int));
|
||||
static const char *objc_demangle PARAMS ((const char *));
|
||||
static const char *objc_printable_name PARAMS ((tree, int));
|
||||
static void objc_expand_function_end PARAMS ((void));
|
||||
|
||||
/* Hash tables to manage the global pool of method prototypes. */
|
||||
@ -477,8 +476,6 @@ objc_init (filename)
|
||||
{
|
||||
filename = c_objc_common_init (filename);
|
||||
|
||||
decl_printable_name = objc_printable_name;
|
||||
|
||||
/* Force the line number back to 0; check_newline will have
|
||||
raised it to 1, which will make the builtin functions appear
|
||||
not to be built in. */
|
||||
@ -8028,7 +8025,7 @@ objc_demangle (mangled)
|
||||
return mangled; /* not an objc mangled name */
|
||||
}
|
||||
|
||||
static const char *
|
||||
const char *
|
||||
objc_printable_name (decl, kind)
|
||||
tree decl;
|
||||
int kind ATTRIBUTE_UNUSED;
|
||||
|
@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
const char *objc_init PARAMS ((const char *));
|
||||
int objc_decode_option PARAMS ((int, char **));
|
||||
const char *objc_printable_name PARAMS ((tree, int));
|
||||
|
||||
/* used by yyparse */
|
||||
|
||||
|
@ -52,6 +52,8 @@ static void objc_post_options PARAMS ((void));
|
||||
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl
|
||||
#undef LANG_HOOKS_PRINT_IDENTIFIER
|
||||
#define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier
|
||||
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
|
||||
#define LANG_HOOKS_DECL_PRINTABLE_NAME objc_printable_name
|
||||
#undef LANG_HOOKS_SET_YYDEBUG
|
||||
#define LANG_HOOKS_SET_YYDEBUG c_set_yydebug
|
||||
/* Inlining hooks same as the C front end. */
|
||||
|
26
gcc/toplev.c
26
gcc/toplev.c
@ -108,7 +108,6 @@ static void init_asm_output PARAMS ((const char *));
|
||||
static void finalize PARAMS ((void));
|
||||
|
||||
static void set_target_switch PARAMS ((const char *));
|
||||
static const char *decl_name PARAMS ((tree, int));
|
||||
|
||||
static void float_signal PARAMS ((int)) ATTRIBUTE_NORETURN;
|
||||
static void crash_signal PARAMS ((int)) ATTRIBUTE_NORETURN;
|
||||
@ -353,16 +352,6 @@ tree current_function_decl;
|
||||
if none. */
|
||||
tree current_function_func_begin_label;
|
||||
|
||||
/* Pointer to function to compute the name to use to print a declaration.
|
||||
DECL is the declaration in question.
|
||||
VERBOSITY determines what information will be printed:
|
||||
0: DECL_NAME, demangled as necessary.
|
||||
1: and scope information.
|
||||
2: and any other information that might be interesting, such as function
|
||||
parameter types in C++. */
|
||||
|
||||
const char *(*decl_printable_name) PARAMS ((tree, int));
|
||||
|
||||
/* Pointer to function to compute rtl for a language-specific tree code. */
|
||||
|
||||
typedef rtx (*lang_expand_expr_t)
|
||||
@ -1559,19 +1548,7 @@ read_integral_parameter (p, pname, defval)
|
||||
|
||||
return atoi (p);
|
||||
}
|
||||
|
||||
|
||||
/* This is the default decl_printable_name function. */
|
||||
|
||||
static const char *
|
||||
decl_name (decl, verbosity)
|
||||
tree decl;
|
||||
int verbosity ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return IDENTIFIER_POINTER (DECL_NAME (decl));
|
||||
}
|
||||
|
||||
|
||||
/* This calls abort and is used to avoid problems when abort if a macro.
|
||||
It is used when we need to pass the address of abort. */
|
||||
|
||||
@ -1829,7 +1806,7 @@ open_dump_file (index, decl)
|
||||
|
||||
if (decl)
|
||||
fprintf (rtl_dump_file, "\n;; Function %s\n\n",
|
||||
decl_printable_name (decl, 2));
|
||||
(*lang_hooks.decl_printable_name) (decl, 2));
|
||||
|
||||
timevar_pop (TV_DUMP);
|
||||
return 1;
|
||||
@ -5002,7 +4979,6 @@ process_options ()
|
||||
static void
|
||||
lang_independent_init ()
|
||||
{
|
||||
decl_printable_name = decl_name;
|
||||
lang_expand_expr = (lang_expand_expr_t) do_abort;
|
||||
|
||||
/* Initialize the garbage-collector, and string pools. */
|
||||
|
10
gcc/tree.h
10
gcc/tree.h
@ -2713,16 +2713,6 @@ extern tree current_function_func_begin_label;
|
||||
|
||||
extern int all_types_permanent;
|
||||
|
||||
/* Pointer to function to compute the name to use to print a declaration.
|
||||
DECL is the declaration in question.
|
||||
VERBOSITY determines what information will be printed:
|
||||
0: DECL_NAME, demangled as necessary.
|
||||
1: and scope information.
|
||||
2: and any other information that might be interesting, such as function
|
||||
parameter types in C++. */
|
||||
|
||||
extern const char *(*decl_printable_name) PARAMS ((tree, int));
|
||||
|
||||
/* Pointer to function to finish handling an incomplete decl at the
|
||||
end of compilation. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user