================ @@ -2376,6 +2376,12 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, FunctionDecl *New = CreateBuiltin(II, R, ID, Loc); RegisterLocallyScopedExternCDecl(New, S); + // Builtin functions shouldn't be owned by any module. + if (New->hasOwningModule()) { + New->setLocalOwningModule(nullptr); ---------------- ChuanqiXu9 wrote:
I posted https://github.com/llvm/llvm-project/issues/102290. Let's talk about this there. And I think I don't have time to do that in the near future and I feel the status quo is not really bad. So I'd like to propose to land this patch first and remove this after we make the implementation design better someday. https://github.com/llvm/llvm-project/pull/102115 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits