diff options
Diffstat (limited to 'lib/Serialization/ASTReaderStmt.cpp')
| -rw-r--r-- | lib/Serialization/ASTReaderStmt.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Serialization/ASTReaderStmt.cpp b/lib/Serialization/ASTReaderStmt.cpp index 8ef1491eb2da..6163b811c769 100644 --- a/lib/Serialization/ASTReaderStmt.cpp +++ b/lib/Serialization/ASTReaderStmt.cpp @@ -119,7 +119,7 @@ void ASTStmtReader::VisitCompoundStmt(CompoundStmt *S) { unsigned NumStmts = Record.readInt(); while (NumStmts--) Stmts.push_back(Record.readSubStmt()); - S->setStmts(Record.getContext(), Stmts); + S->setStmts(Stmts); S->LBraceLoc = ReadSourceLocation(); S->RBraceLoc = ReadSourceLocation(); } @@ -3081,7 +3081,8 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) { break; case STMT_COMPOUND: - S = new (Context) CompoundStmt(Empty); + S = CompoundStmt::CreateEmpty( + Context, /*NumStmts=*/Record[ASTStmtReader::NumStmtFields]); break; case STMT_CASE: |
