================
@@ -387,6 +388,12 @@ int Command::Execute(ArrayRef<std::optional<StringRef>> 
Redirects,
                                    ErrMsg, ExecutionFailed, &ProcStat);
 }
 
+void Command::enableFree() {
+  llvm::erase_if(Arguments, [](const char *Arg) {
+    return StringRef(Arg) == "-disable-free";
----------------
rnk wrote:

Can you find a way to make the command correct by construction, rather than 
building the command one way and filtering out the thing we don't want? We 
already through through a "for diagnostics" flag.

Worst case, if we mark which commands support disable free, we can move the 
addition of disable free to the CC1Command class (here) instead of the Clang 
toolchain logic.

https://github.com/llvm/llvm-project/pull/222531
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to