diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-08-25 00:34:00 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-08-25 00:34:00 +0000 |
commit | 0bae624934ccee9434893025fc80cfd4bbd8eec8 (patch) | |
tree | 908dfc25a654aecc83409b10be76db11ca0a710d /clang/lib/Serialization/ASTWriter.cpp | |
parent | cad3a995a46d6ceb4d3321476009a0bbcc9065c7 (diff) | |
download | bcm5719-llvm-0bae624934ccee9434893025fc80cfd4bbd8eec8.tar.gz bcm5719-llvm-0bae624934ccee9434893025fc80cfd4bbd8eec8.zip |
Lazily load the ContextDecl for a lambda's DefinitionData, to fix a
deserialization cycle caused by the ContextDecl recursively importing members
of the lambda's closure type.
llvm-svn: 279694
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 72b2bf6d168..7f9ae8df1cd 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -5565,7 +5565,7 @@ void ASTRecordWriter::AddCXXDefinitionData(const CXXRecordDecl *D) { Record->push_back(Lambda.NumCaptures); Record->push_back(Lambda.NumExplicitCaptures); Record->push_back(Lambda.ManglingNumber); - AddDeclRef(Lambda.ContextDecl); + AddDeclRef(D->getLambdaContextDecl()); AddTypeSourceInfo(Lambda.MethodTyInfo); for (unsigned I = 0, N = Lambda.NumCaptures; I != N; ++I) { const LambdaCapture &Capture = Lambda.Captures[I]; |