summaryrefslogtreecommitdiffstats
path: root/clang/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
commita34b0577629e3a63bc018fa6da903d2617ef71d7 (patch)
treef57e20594afb1afd122321476825f1c0b93cb36f /clang/AST/StmtSerialization.cpp
parent89704afa439e04fd9655f6fe2b1a53d0bb7e29e2 (diff)
downloadbcm5719-llvm-a34b0577629e3a63bc018fa6da903d2617ef71d7.tar.gz
bcm5719-llvm-a34b0577629e3a63bc018fa6da903d2617ef71d7.zip
Revised serialization of CaseStmt to emit all of the owned pointers (its
subexpressions) all together in one block at the end. llvm-svn: 43862
Diffstat (limited to 'clang/AST/StmtSerialization.cpp')
-rw-r--r--clang/AST/StmtSerialization.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/clang/AST/StmtSerialization.cpp b/clang/AST/StmtSerialization.cpp
index 86d52a4f681..99a14f2a30f 100644
--- a/clang/AST/StmtSerialization.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud