[PATCH] D103516: [clang][deps] Customize PCM path via -build-dir argument

Michael Spencer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 3 08:50:15 PDT 2021


Bigcheese accepted this revision.
Bigcheese added a comment.
This revision is now accepted and ready to land.

lgtm with a few minor changes.



================
Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:168-169
+    "build-dir",
+    llvm::cl::desc("With '-generate-modules-path-args', put the PCM files in"
+                   "the provided directory instead of the module cache."),
+    llvm::cl::cat(DependencyScannerCategory));
----------------
This was a bit confusing at first. I think it would be better to say that the paths that it returns are using this directory as a base. clang-scan-deps doesn't actually put files in here itself, it just returns paths that use it.


================
Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:419
       Modules;
+  std::unordered_map<IndexedModuleID, std::string, IndexedModuleIDHasher>
+      PCMPaths;
----------------
This doesn't need to use the `IndexedModuleID`. It can just use `ModuleID`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103516



More information about the cfe-commits mailing list