aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2021-10-07 12:09:14 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2021-10-07 12:09:14 -0700
commitae2df1a347fad44fa70990311ca981698487b780 (patch)
tree9fa4da81a9e6b9bd5295908f96c57a35146c149c /gcc/toplev.c
parent0e90799071ee78f712f3b58fca7000bc0a258ade (diff)
downloadgcc-ae2df1a347fad44fa70990311ca981698487b780.zip
gcc-ae2df1a347fad44fa70990311ca981698487b780.tar.gz
gcc-ae2df1a347fad44fa70990311ca981698487b780.tar.bz2
ctf: Do not warn for CTF not supported for GNU GIMPLE
CTF is supported for C only. Currently, a warning is emitted if the -gctf command line option is specified for a non-C frontend. This warning is also used by the GCC testsuite framework - it skips adding -gctf to the list of debug flags for automated testing, if CTF is not supported for the frontend. The following warning, however, is not useful in case of LTO: "lto1: note: CTF debug info requested, but not supported for ‘GNU GIMPLE’ frontend" This patch disables the generation of the above warning for GNU GIMPLE. gcc/ChangeLog: * toplev.c (process_options): Do not warn for GNU GIMPLE.
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index ecb2b69..1bb1794 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1408,14 +1408,16 @@ process_options (bool no_backend)
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. */
+ /* CTF is supported for only C at this time. */
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);
+ /* Compiling with -flto results in frontend language of GNU GIMPLE. It
+ is not useful to warn in that case. */
+ if (!startswith (lang_hooks.name, "GNU GIMPLE"))
+ inform (UNKNOWN_LOCATION,
+ "CTF debug info requested, but not supported for %qs frontend",
+ language_string);
ctf_debug_info_level = CTFINFO_LEVEL_NONE;
}