================
@@ -6968,8 +6968,8 @@ defm unsigned : OptInFC1FFlag<"unsigned", "Enables 
UNSIGNED type">;
 def fno_automatic : Flag<["-"], "fno-automatic">, Group<f_Group>,
   HelpText<"Implies the SAVE attribute for non-automatic local objects in 
subprograms unless RECURSIVE">;
 
-def fsave_main_program : Flag<["-"], "fsave-main-program">, Group<f_Group>,
-  HelpText<"Place all variables from the main program in static memory 
(otherwise scalars may be placed on the stack)">;
+defm save_main_program : OptInFC1FFlag<"save-main-program",
----------------
jeanPerier wrote:

It does. I just copied from other usages, but looking into it, I think that is 
the intention for this from.

The prefixes are for the help messages and only the positive from of the flag 
is printed in the help since the negative is the default behavior (hence the 
"OptIn"). So this sets the help message of the positive form via `pos_prefix` 
and leaves the negative from help text empty (`neg_prefix # help`)).

But I actually want the negative from to be printed, I am not a fan of hidden 
options, so I changed to `BoolOptionWithoutMarshalling`. Thanks for raising the 
question!

https://github.com/llvm/llvm-project/pull/124110
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to