aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Compiler.cpp
diff options
context:
space:
mode:
authorAnutosh Bhat <andersonbhat491@gmail.com>2025-08-27 15:30:23 +0530
committerGitHub <noreply@github.com>2025-08-27 15:30:23 +0530
commit75b36d043e9992ec7c52c7d17f989c09a76011c7 (patch)
tree19bec31a9e47e717afa6f96fc4ef91e3dfc07d99 /clang/lib/AST/ByteCode/Compiler.cpp
parentd5c5ed3723a61b19c72c05f7dff31aa00917027a (diff)
downloadllvm-75b36d043e9992ec7c52c7d17f989c09a76011c7.zip
llvm-75b36d043e9992ec7c52c7d17f989c09a76011c7.tar.gz
llvm-75b36d043e9992ec7c52c7d17f989c09a76011c7.tar.bz2
[clang-repl] Put CompilerInstance from IncrementalAction to use for non-assert/assert builds (#155400)
See https://github.com/llvm/llvm-project/pull/137458#discussion_r2300649286 Context: So the CompilerInstance CI being used with the Incremental Action are tightly coupled in any case. Which means the CI put to use while constructing the IncrementalAction ``` Act = TSCtx->withContextDo([&](llvm::LLVMContext *Ctx) { return std::make_unique<IncrementalAction>(*CI, *Ctx, ErrOut, *this, std::move(Consumer)); }); ``` Is also the CI through which the we call `ExecuteAction` on `Act` ``` CI->ExecuteAction(*Act); ``` So we need to use CI as a member variable in IncrementalAction for assert builds for https://github.com/llvm/llvm-project/blob/bddac5eda9b7591e05ccdc86a5e86c592085f318/clang/lib/Interpreter/IncrementalAction.cpp#L97-L108 The same can be put to use for `CreateASTConsumer` too as all of these are referring to the same CI ``` std::unique_ptr<ASTConsumer> IncrementalAction::CreateASTConsumer(CompilerInstance & /*CI*/, StringRef InFile) { std::unique_ptr<ASTConsumer> C = WrapperFrontendAction::CreateASTConsumer(this->CI, InFile); ```
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
0 files changed, 0 insertions, 0 deletions