/* Output dbx-format symbol table information from GNU compiler.
- Copyright (C) 1987-2014 Free Software Foundation, Inc.
+ Copyright (C) 1987-2015 Free Software Foundation, Inc.
This file is part of GCC.
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-
+#include "alias.h"
#include "tree.h"
+#include "fold-const.h"
#include "varasm.h"
#include "stor-layout.h"
#include "rtl.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "tm_p.h"
-#include "ggc.h"
#include "debug.h"
-#include "hashtab.h"
-#include "hash-set.h"
-#include "vec.h"
-#include "machmode.h"
-#include "hard-reg-set.h"
-#include "input.h"
#include "function.h"
#include "target.h"
#include "common/common-target.h"
#include "langhooks.h"
#include "obstack.h"
+#include "expmed.h"
+#include "dojump.h"
+#include "explow.h"
+#include "calls.h"
+#include "emit-rtl.h"
+#include "stmt.h"
#include "expr.h"
-#include "hash-map.h"
-#include "is-a.h"
-#include "plugin-api.h"
-#include "ipa-ref.h"
#include "cgraph.h"
+#include "stringpool.h"
#ifdef XCOFF_DEBUGGING_INFO
#include "xcoffout.h"
static void dbxout_symbol_name (tree, const char *, int);
static void dbxout_common_name (tree, const char *, stab_code_type);
static const char *dbxout_common_check (tree, int *);
-static void dbxout_global_decl (tree);
+static void dbxout_early_global_decl (tree);
+static void dbxout_late_global_decl (tree);
static void dbxout_type_decl (tree, int);
static void dbxout_handle_pch (unsigned);
static void debug_free_queue (void);
dbxout_init,
dbxout_finish,
debug_nothing_void,
+ debug_nothing_void,
debug_nothing_int_charstar,
debug_nothing_int_charstar,
dbxout_start_source_file,
debug_nothing_tree, /* begin_function */
#endif
debug_nothing_int, /* end_function */
+ debug_nothing_tree, /* register_main_translation_unit */
dbxout_function_decl,
- dbxout_global_decl, /* global_decl */
+ dbxout_early_global_decl, /* early_global_decl */
+ dbxout_late_global_decl, /* late_global_decl */
dbxout_type_decl, /* type_decl */
debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */
debug_nothing_tree, /* deferred_inline_function */
dbxout_init,
dbxout_finish,
debug_nothing_void,
+ debug_nothing_void,
debug_nothing_int_charstar,
debug_nothing_int_charstar,
dbxout_start_source_file,
xcoffout_end_epilogue,
debug_nothing_tree, /* begin_function */
xcoffout_end_function,
+ debug_nothing_tree, /* register_main_translation_unit */
debug_nothing_tree, /* function_decl */
- dbxout_global_decl, /* global_decl */
+ dbxout_early_global_decl, /* early_global_decl */
+ dbxout_late_global_decl, /* late_global_decl */
dbxout_type_decl, /* type_decl */
debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */
debug_nothing_tree, /* deferred_inline_function */
get_lang_number (void)
{
const char *language_string = lang_hooks.name;
-
- if (strcmp (language_string, "GNU C") == 0)
+ if (lang_GNU_C ())
return N_SO_C;
- else if (strcmp (language_string, "GNU C++") == 0)
+ else if (lang_GNU_CXX ())
return N_SO_CC;
else if (strcmp (language_string, "GNU F77") == 0)
return N_SO_FORTRAN;
- else if (strcmp (language_string, "GNU Fortran") == 0)
+ else if (lang_GNU_Fortran ())
return N_SO_FORTRAN90; /* CHECKME */
else if (strcmp (language_string, "GNU Pascal") == 0)
return N_SO_PASCAL;
#endif /* DBX_DEBUGGING_INFO */
+static void
+dbxout_early_global_decl (tree decl ATTRIBUTE_UNUSED)
+{
+ /* NYI for non-dwarf. */
+}
+
/* Debug information for a global DECL. Called from toplev.c after
compilation proper has finished. */
static void
-dbxout_global_decl (tree decl)
+dbxout_late_global_decl (tree decl)
{
if (TREE_CODE (decl) == VAR_DECL && !DECL_EXTERNAL (decl))
{
access == access_protected_node
? '1' :'0');
if (BINFO_VIRTUAL_P (child)
- && (strcmp (lang_hooks.name, "GNU C++") == 0
+ && (lang_GNU_CXX ()
|| strcmp (lang_hooks.name, "GNU Objective-C++") == 0))
/* For a virtual base, print the (negative)
offset within the vtable where we must look
break;
default:
+ /* A C++ function with deduced return type can have a TEMPLATE_TYPE_PARM
+ named 'auto' in its type.
+ No debug info for TEMPLATE_TYPE_PARM type supported yet. */
+ if (lang_GNU_CXX ())
+ {
+ tree name = TYPE_IDENTIFIER (type);
+ if (name == get_identifier ("auto")
+ || name == get_identifier ("decltype(auto)"))
+ break;
+ }
+
gcc_unreachable ();
}
}
stabstr_I (t);
}
-/* Output leading leading struct or class names needed for qualifying
- type whose scope is limited to a struct or class. */
+/* Output leading struct or class names needed for qualifying type
+ whose scope is limited to a struct or class. */
static void
dbxout_class_name_qualifiers (tree decl)
we rely on the fact that error_mark_node initializers always
end up in bss for C++ and never end up in bss for C. */
if (DECL_INITIAL (decl) == 0
- || (!strcmp (lang_hooks.name, "GNU C++")
+ || (lang_GNU_CXX ()
&& DECL_INITIAL (decl) == error_mark_node))
{
int offs;