[clang] Make the `-disable-free` flag more full featured (PR #136213)
Chandler Carruth via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 17 17:04:51 PDT 2025
================
@@ -7889,9 +7889,13 @@ def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">,
def skip_function_bodies : Flag<["-"], "skip-function-bodies">,
HelpText<"Skip function bodies when possible">,
MarshallingInfoFlag<FrontendOpts<"SkipFunctionBodies">>;
-def disable_free : Flag<["-"], "disable-free">,
- HelpText<"Disable freeing of memory on exit">,
- MarshallingInfoFlag<FrontendOpts<"DisableFree">>;
+defm disable_free : BoolOption<"",
+ "disable-free",
+ FrontendOpts<"DisableFree">,
+ DefaultFalse,
+ PosFlag<SetTrue, [], [ClangOption], "Disable">,
+ NegFlag<SetFalse, [], [ClangOption], "Don't disable">,
+ BothFlags<[], [ClangOption], " freeing of memory on exit">>;
----------------
chandlerc wrote:
AFAIK, this remains a CC1 flag (same as the below flag), and just allows us to invert it.
I wasn't suggesting lifting it all the way up, just making it have the more complete logical set of operations.
https://github.com/llvm/llvm-project/pull/136213
More information about the cfe-commits
mailing list