[PATCH] D108979: [clang][deps] NFC: Stop going through ClangTool

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 2 05:50:20 PDT 2021


jansvoboda11 added a comment.

I think `ToolInvocation` is somewhat well-suited for the dependency scanner. It takes care of the `DiagnosticOptions` setup, running the driver, extracting source-reading cc1 command-line, creating `CompilerInvocation` and invoking the action itself. This is what we'd need to do anyways.

I agree that the `std::vector<std::string>` interface is unfortunate, especially since `ToolInvocation::run` converts that into `std::vector<const char *>` anyways. I think we can move that conversion into the current constructor that accepts `std::vector<std::string>`, add another constructor that takes `ArrayRef<const char *>` and use that from the dependency scanner.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108979



More information about the cfe-commits mailing list