[clang] [clang][deps] Remove dependency on `tooling::ToolAction` (PR #149904)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 22 09:19:38 PDT 2025
================
@@ -710,17 +704,25 @@ static bool forEachDriverJob(
static bool createAndRunToolInvocation(
std::vector<std::string> CommandLine, DependencyScanningAction &Action,
- FileManager &FM,
+ IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS,
std::shared_ptr<clang::PCHContainerOperations> &PCHContainerOps,
DiagnosticsEngine &Diags, DependencyConsumer &Consumer) {
// Save executable path before providing CommandLine to ToolInvocation
std::string Executable = CommandLine[0];
- ToolInvocation Invocation(std::move(CommandLine), &Action, &FM,
- PCHContainerOps);
- Invocation.setDiagnosticConsumer(Diags.getClient());
- Invocation.setDiagnosticOptions(&Diags.getDiagnosticOptions());
- if (!Invocation.run())
+
+ llvm::opt::ArgStringList Argv;
+ for (const std::string &Str : ArrayRef(CommandLine).drop_front())
----------------
jansvoboda11 wrote:
Seems like it. I confirmed things work even when I drop "-cc1". What would you prefer to do here?
https://github.com/llvm/llvm-project/pull/149904
More information about the cfe-commits
mailing list