]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
match.pd: Remove commented out line pragmas unless -vv is used.
authorTamar Christina <tamar.christina@arm.com>
Fri, 5 May 2023 12:36:01 +0000 (13:36 +0100)
committerTamar Christina <tamar.christina@arm.com>
Fri, 5 May 2023 12:47:35 +0000 (13:47 +0100)
genmatch currently outputs commented out line directives that have no effect
but the compiler still has to parse only to discard.

They are however handy when debugging genmatch output.  As such this moves them
behind the -vv flag.

gcc/ChangeLog:

PR bootstrap/84402
* genmatch.cc (output_line_directive): Only emit commented directive
when -vv.

gcc/genmatch.cc

index 638606b2502f640e59527fc5a0b23fa3bedd0cee..2533698bd9edc5a3bf0e5b8e35ac3955dbd4f90b 100644 (file)
@@ -209,7 +209,7 @@ output_line_directive (FILE *f, location_t location,
       else
        fprintf (f, "%s:%d", file, loc.line);
     }
-  else
+  else if (verbose >= 2)
     /* Other gen programs really output line directives here, at least for
        development it's right now more convenient to have line information
        from the generated file.  Still keep the directives as comment for now