X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Flanghooks.c;h=194993f7ab342aa440acecaff14386df32513cb2;hb=d0aaf3990d011abe5d7c65905f240a60d2fdccb6;hp=fa9b8dd3acadf131e87a8d871dc8ad44dde47f0f;hpb=8458f4cac305c696018037b6ed87ea8e30b7473d;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/langhooks.c b/gcc/langhooks.c index fa9b8dd3aca..194993f7ab3 100644 --- a/gcc/langhooks.c +++ b/gcc/langhooks.c @@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see #include "langhooks-def.h" #include "ggc.h" #include "diagnostic.h" +#include "cgraph.h" /* Do nothing; in many cases the default hook. */ @@ -300,28 +301,25 @@ lhd_decl_ok_for_sibcall (const_tree decl ATTRIBUTE_UNUSED) return true; } -/* Return the COMDAT group into which DECL should be placed. */ - -const char * -lhd_comdat_group (tree decl) -{ - return IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); -} - /* lang_hooks.decls.final_write_globals: perform final processing on global variables. */ void write_global_declarations (void) { + tree globals, decl, *vec; + int len, i; + + /* This lang hook is dual-purposed, and also finalizes the + compilation unit. */ + cgraph_finalize_compilation_unit (); + /* Really define vars that have had only a tentative definition. Really output inline functions that must actually be callable and have not been output so far. */ - tree globals = lang_hooks.decls.getdecls (); - int len = list_length (globals); - tree *vec = XNEWVEC (tree, len); - int i; - tree decl; + globals = lang_hooks.decls.getdecls (); + len = list_length (globals); + vec = XNEWVEC (tree, len); /* Process the decls in reverse order--earliest first. Put them into VEC from back to front, then take out from front. */ @@ -380,11 +378,11 @@ lhd_print_error_function (diagnostic_context *context, const char *file, if (TREE_CODE (TREE_TYPE (fndecl)) == METHOD_TYPE) pp_printf (context->printer, _("In member function %qs"), - lang_hooks.decl_printable_name (fndecl, 2)); + identifier_to_locale (lang_hooks.decl_printable_name (fndecl, 2))); else pp_printf (context->printer, _("In function %qs"), - lang_hooks.decl_printable_name (fndecl, 2)); + identifier_to_locale (lang_hooks.decl_printable_name (fndecl, 2))); while (abstract_origin) { @@ -432,21 +430,21 @@ lhd_print_error_function (diagnostic_context *context, const char *file, pp_newline (context->printer); if (s.file != NULL) { - if (flag_show_column && s.column != 0) + if (flag_show_column) pp_printf (context->printer, _(" inlined from %qs at %s:%d:%d"), - lang_hooks.decl_printable_name (fndecl, 2), + identifier_to_locale (lang_hooks.decl_printable_name (fndecl, 2)), s.file, s.line, s.column); else pp_printf (context->printer, _(" inlined from %qs at %s:%d"), - lang_hooks.decl_printable_name (fndecl, 2), + identifier_to_locale (lang_hooks.decl_printable_name (fndecl, 2)), s.file, s.line); } else pp_printf (context->printer, _(" inlined from %qs"), - lang_hooks.decl_printable_name (fndecl, 2)); + identifier_to_locale (lang_hooks.decl_printable_name (fndecl, 2))); } } pp_character (context->printer, ':'); @@ -524,7 +522,7 @@ add_builtin_function_common (const char *name, tree (*hook) (tree)) { tree id = get_identifier (name); - tree decl = build_decl (FUNCTION_DECL, id, type); + tree decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL, id, type); TREE_PUBLIC (decl) = 1; DECL_EXTERNAL (decl) = 1;