[flang-commits] [clang] [flang] [flang][driver] add negative from of -fsave-main-program (PR #124110)
via flang-commits
flang-commits at lists.llvm.org
Fri Jan 24 07:00:07 PST 2025
================
@@ -6968,8 +6968,11 @@ 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 : BoolOptionWithoutMarshalling<"f", "save-main-program",
+ PosFlag<SetTrue, [], [ClangOption],
----------------
jeanPerier wrote:
Thanks for pointing that out. I indeed took that from the example above. The flag is not accepted by clang, but this `ClangOption` is just misleading and useless: it is actually overridden because this definition is made in a `let Visibility = [FC1Option, FlangOption] in {` scope.
I removed it here and will clean-up the other flags in a separate patch.
https://github.com/llvm/llvm-project/pull/124110
More information about the flang-commits
mailing list