aboutsummaryrefslogtreecommitdiff
path: root/AST/StmtSerialization.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-11-08 00:56:26 +0000
committerTed Kremenek <kremenek@apple.com>2007-11-08 00:56:26 +0000
commit103fc81f12aa635aa0a573c94b1aceb496b4e587 (patch)
treefa25f4ffe98c17343fd30393295d600b2e27e7c7 /AST/StmtSerialization.cpp
parent83efb151a0c1df8cb8fb25d6dbb6c0f12f07f60a (diff)
Revised serialization of CaseStmt to emit all of the owned pointers (its
subexpressions) all together in one block at the end. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'AST/StmtSerialization.cpp')
-rw-r--r--AST/StmtSerialization.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/AST/StmtSerialization.cpp b/AST/StmtSerialization.cpp
index 86d52a4f68..99a14f2a30 100644
--- a/AST/StmtSerialization.cpp
+++ b/AST/StmtSerialization.cpp
@@ -190,17 +190,14 @@ CallExpr* CallExpr::directMaterialize(Deserializer& D) {
void CaseStmt::directEmit(Serializer& S) const {
S.Emit(CaseLoc);
S.EmitPtr(getNextSwitchCase());
- S.BatchEmitOwnedPtrs(getLHS(),getRHS(),getSubStmt());
+ S.BatchEmitOwnedPtrs((unsigned) END_EXPR,&SubExprs[0]);
}
CaseStmt* CaseStmt::directMaterialize(Deserializer& D) {
SourceLocation CaseLoc = SourceLocation::ReadVal(D);
- Expr *LHS, *RHS;
- Stmt* SubStmt;
- D.BatchReadOwnedPtrs(LHS,RHS,SubStmt);
-
- CaseStmt* stmt = new CaseStmt(LHS,RHS,SubStmt,CaseLoc);
- stmt->setNextSwitchCase(D.ReadPtr<SwitchCase>());
+ CaseStmt* stmt = new CaseStmt(NULL,NULL,NULL,CaseLoc);
+ D.ReadPtr(stmt->NextSwitchCase);
+ D.BatchReadOwnedPtrs((unsigned) END_EXPR,&stmt->SubExprs[0]);
return stmt;
}