aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-06-29 08:49:26 +0200
committerMartin Liska <mliska@suse.cz>2021-06-29 08:49:26 +0200
commit490d1e1be15b62b51a2de248e6d7f76356402bc9 (patch)
treea140872a97abd647ca0e5287e5375b7514be227b /gcc/toplev.c
parentadf0825ae77554b00615521a545b608892bb272c (diff)
parent095a01cf6e3883b3083cf339b680cdb39910f529 (diff)
downloadgcc-490d1e1be15b62b51a2de248e6d7f76356402bc9.zip
gcc-490d1e1be15b62b51a2de248e6d7f76356402bc9.tar.gz
gcc-490d1e1be15b62b51a2de248e6d7f76356402bc9.tar.bz2
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 55e7550..43f1f7d 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -86,6 +86,7 @@ along with GCC; see the file COPYING3. If not see
#include "optinfo-emit-json.h"
#include "ipa-modref-tree.h"
#include "ipa-modref.h"
+#include "ipa-param-manipulation.h"
#include "dbgcnt.h"
#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO)
@@ -1231,6 +1232,7 @@ parse_alignment_opts (void)
static void
process_options (void)
{
+ const char *language_string = lang_hooks.name;
/* Just in case lang_hooks.post_options ends up calling a debug_hook.
This can happen with incorrect pre-processed input. */
debug_hooks = &do_nothing_debug_hooks;
@@ -1414,6 +1416,17 @@ process_options (void)
debug_info_level = DINFO_LEVEL_NONE;
}
+ /* CTF is supported for only C at this time.
+ Compiling with -flto results in frontend language of GNU GIMPLE. */
+ if (!lang_GNU_C ()
+ && ctf_debug_info_level > CTFINFO_LEVEL_NONE)
+ {
+ inform (UNKNOWN_LOCATION,
+ "CTF debug info requested, but not supported for %qs frontend",
+ language_string);
+ ctf_debug_info_level = CTFINFO_LEVEL_NONE;
+ }
+
if (flag_dump_final_insns && !flag_syntax_only && !no_backend)
{
FILE *final_output = fopen (flag_dump_final_insns, "w");
@@ -1435,7 +1448,8 @@ process_options (void)
/* A lot of code assumes write_symbols == NO_DEBUG if the debugging
level is 0. */
- if (debug_info_level == DINFO_LEVEL_NONE)
+ if (debug_info_level == DINFO_LEVEL_NONE
+ && ctf_debug_info_level == CTFINFO_LEVEL_NONE)
write_symbols = NO_DEBUG;
if (write_symbols == NO_DEBUG)
@@ -1449,7 +1463,8 @@ process_options (void)
debug_hooks = &xcoff_debug_hooks;
#endif
#ifdef DWARF2_DEBUGGING_INFO
- else if (write_symbols == DWARF2_DEBUG)
+ else if (dwarf_debuginfo_p ()
+ || dwarf_based_debuginfo_p ())
debug_hooks = &dwarf2_debug_hooks;
#endif
#ifdef VMS_DEBUGGING_INFO
@@ -1471,6 +1486,7 @@ process_options (void)
/* We know which debug output will be used so we can set flag_var_tracking
and flag_var_tracking_uninit if the user has not specified them. */
if (debug_info_level < DINFO_LEVEL_NORMAL
+ || !dwarf_debuginfo_p ()
|| debug_hooks->var_location == do_nothing_debug_hooks.var_location)
{
if (flag_var_tracking == 1
@@ -2393,6 +2409,7 @@ toplev::finalize (void)
ipa_reference_c_finalize ();
ipa_fnsummary_c_finalize ();
ipa_modref_c_finalize ();
+ ipa_edge_modifications_finalize ();
cgraph_c_finalize ();
cgraphunit_c_finalize ();