[clang] [clang-repl] Link builtin bitcode into every PTU (PR #229788)
Aaron Jomy via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 7 08:06:42 PDT 2026
================
@@ -173,6 +174,16 @@ void BackendConsumer::HandleInterestingDecl(DeclGroupRef D) {
// Links each entry in LinkModules into our module. Returns true on error.
bool BackendConsumer::LinkInModules(llvm::Module *M) {
+ // Builtin bitcode is internalized into the module that links it, so each
+ // PTU of an incremental session needs its own copy. Plain bitcode files are
+ // still linked once.
+ if (LinkModules.empty() && LangOpts.IncrementalExtensions) {
----------------
aaronj0 wrote:
makes sense, thanks
https://github.com/llvm/llvm-project/pull/229788
More information about the cfe-commits
mailing list