From f1c5c227b740b778600b8b081a8a247939c5f01e Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Fri, 3 Jan 2025 10:56:11 +0100 Subject: [PATCH] Avoid conversion to std::function of cc1_main. --- toolchain/driver/clang_runner.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/toolchain/driver/clang_runner.cpp b/toolchain/driver/clang_runner.cpp index 52a9f4481441..83347d581639 100644 --- a/toolchain/driver/clang_runner.cpp +++ b/toolchain/driver/clang_runner.cpp @@ -146,8 +146,7 @@ auto ClangRunner::Run(llvm::ArrayRef args) -> bool { // Note the subprocessing will effectively call `clang -cc1`, which turns into // `carbon-busybox clang -cc1`, which results in an equivalent `clang_main` // call. - std::function & cc1_args)> cc1_main = - [](llvm::SmallVectorImpl& cc1_args) -> int { + auto cc1_main = [](llvm::SmallVectorImpl& cc1_args) -> int { // cc1_args[0] will be the `clang_path` so we don't need the prepend arg. llvm::ToolContext tool_context = { .Path = cc1_args[0], .PrependArg = "clang", .NeedsPrependArg = false};