[clang] [clang] Remove -g[no-]-* bool flags from g_Group (PR #162750)

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 9 16:56:21 PDT 2025


================
@@ -545,15 +545,16 @@ multiclass BoolFOption<string flag_base, KeyPathAndMacro kpm,
               Group<f_Group>;
 }
 
-// Creates a BoolOption where both of the flags are prefixed with "g" and have
-// the Group<g_Group>.
+// Creates a BoolOption where both of the flags are prefixed with "g".
+// Does *not* map to g_Group, because that is reserved for flags that are
+// intended to enable (or disable) debug info, which is not appropriate for a
+// negative boolean flag (-gno-${feature}).
 // Used for -cc1 frontend options. Driver-only options do not map to
 // CompilerInvocation.
 multiclass BoolGOption<string flag_base, KeyPathAndMacro kpm,
                        Default default, FlagDef flag1, FlagDef flag2,
                        BothFlags both = BothFlags<[]>> {
-  defm NAME : BoolOption<"g", flag_base, kpm, default, flag1, flag2, both>,
-              Group<g_Group>;
----------------
alexfh wrote:

Could you remove the "Implies -g." part from the description of the affected options?

https://github.com/llvm/llvm-project/pull/162750


More information about the cfe-commits mailing list