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

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

Reply via email to