[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 26 09:22:20 PDT 2024
================
@@ -5706,6 +5707,27 @@ void ASTWriter::WriteDeclAndTypes(ASTContext &Context) {
Stream.EmitRecord(DELAYED_NAMESPACE_LEXICAL_VISIBLE_RECORD,
DelayedNamespaceRecord);
+ if (!FunctionToLambdasMap.empty()) {
+ // TODO: on disk hash table for function to lambda mapping might be more
+ // efficent becuase it allows lazy deserialization.
+ RecordData FunctionToLambdasMapRecord;
+ for (const auto &Pair : FunctionToLambdasMap) {
----------------
rnk wrote:
Nevermind, I see you have a better fix.
https://github.com/llvm/llvm-project/pull/109167
More information about the cfe-commits
mailing list