arphaman added inline comments.

================
Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:32
 
+class DependencyCollectorFactory {
+public:
----------------
aganea wrote:
> Do you envision future uses for this factory?
Most likely, yes.

I don't want to lock-in into creating the dependency printer in the 
`PreprocessorOnlyTool`, as the eventual goal is to have it in a library, and 
allow clients to consume modular dependencies not only using `clang-scan-deps` 
tool itself, but using the C++ library directly (potentially through a libclang 
C interface as well). The printer should be in `clang-scan-deps` tool itself 
though, so it wouldn't be ideal to reference it from `PreprocessorOnlyTool` now.


================
Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:50
+        std::unique_ptr<DependencyOutputOptions> Opts) override {
+      std::unique_lock<std::mutex> LockGuard(SharedLock);
+      return std::make_shared<DependencyPrinter>(std::move(Opts), SharedLock,
----------------
aganea wrote:
> Do you need the blocking behavior here? You're simply passing the Lock by 
> reference, but not using the stream that it protects.
Right, I don't need it here. removed in the updated patch.


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

https://reviews.llvm.org/D63579



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to