Serialize and deserialize some missing bits from BlockDecl.

llvm-svn: 154676
This commit is contained in:
John McCall 2012-04-13 17:33:29 +00:00
parent 1840cc2cc6
commit cf6ce28f71
2 changed files with 7 additions and 0 deletions

View File

@ -955,6 +955,10 @@ void ASTDeclReader::VisitBlockDecl(BlockDecl *BD) {
Params.push_back(ReadDeclAs<ParmVarDecl>(Record, Idx));
BD->setParams(Params);
BD->setIsVariadic(Record[Idx++]);
BD->setBlockMissingReturnType(Record[Idx++]);
BD->setIsConversionFromLambda(Record[Idx++]);
bool capturesCXXThis = Record[Idx++];
unsigned numCaptures = Record[Idx++];
SmallVector<BlockDecl::Capture, 16> captures;

View File

@ -775,6 +775,9 @@ void ASTDeclWriter::VisitBlockDecl(BlockDecl *D) {
for (FunctionDecl::param_iterator P = D->param_begin(), PEnd = D->param_end();
P != PEnd; ++P)
Writer.AddDeclRef(*P, Record);
Record.push_back(D->isVariadic());
Record.push_back(D->blockMissingReturnType());
Record.push_back(D->isConversionFromLambda());
Record.push_back(D->capturesCXXThis());
Record.push_back(D->getNumCaptures());
for (BlockDecl::capture_iterator