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/ASTReaderDecl.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/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index 04231cd8e0b..e00c9561cd8 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -1539,7 +1539,7 @@ void ASTDeclReader::ReadCXXDefinitionData( Lambda.NumCaptures = Record[Idx++]; Lambda.NumExplicitCaptures = Record[Idx++]; Lambda.ManglingNumber = Record[Idx++]; - Lambda.ContextDecl = ReadDecl(Record, Idx); + Lambda.ContextDecl = ReadDeclID(Record, Idx); Lambda.Captures = (Capture*)Reader.Context.Allocate(sizeof(Capture)*Lambda.NumCaptures); Capture *ToCapture = Lambda.Captures; |