[PATCH] D127229: [clang][deps] Set -disable-free for module compilations

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 00:59:25 PDT 2022


jansvoboda11 added inline comments.


================
Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp:338
+                        // always true for a driver invocation.
+                        bool DisableFree = true;
                         DependencyScanningAction Action(
----------------
I see the driver is adding `-disable-free` conditionally:

```
  if (!C.isForDiagnostics())
    CmdArgs.push_back("-disable-free");
```

Does that change anything for this patch?


================
Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp:338
+                        // always true for a driver invocation.
+                        bool DisableFree = true;
                         DependencyScanningAction Action(
----------------
jansvoboda11 wrote:
> I see the driver is adding `-disable-free` conditionally:
> 
> ```
>   if (!C.isForDiagnostics())
>     CmdArgs.push_back("-disable-free");
> ```
> 
> Does that change anything for this patch?
If this is always `true` for our purposes, is there a reason for passing this argument into `DependencyScanningAction` instead of just hard-coding it there?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127229/new/

https://reviews.llvm.org/D127229



More information about the cfe-commits mailing list