summaryrefslogtreecommitdiffstats
path: root/clang/AST/StmtSerialization.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-01-07 18:35:04 +0000
committerTed Kremenek <kremenek@apple.com>2008-01-07 18:35:04 +0000
commitdabea046f69d97cf633152d1bba25dc92644dc59 (patch)
treeb6257a224cd3b07db62eab6036fddf668e1c81a8 /clang/AST/StmtSerialization.cpp
parentd5450b7f07e0d72c7a7d75e1cd63a5cfbfc180c9 (diff)
downloadbcm5719-llvm-dabea046f69d97cf633152d1bba25dc92644dc59.tar.gz
bcm5719-llvm-dabea046f69d97cf633152d1bba25dc92644dc59.zip
Minor tweak to serialization of ObjcForCollectionStmt: the three owned pointers
are now emitted in a batch, which reduces the metadata overhead in the serialized bitcode. llvm-svn: 45710
Diffstat (limited to 'clang/AST/StmtSerialization.cpp')
-rw-r--r--clang/AST/StmtSerialization.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/AST/StmtSerialization.cpp b/clang/AST/StmtSerialization.cpp
index adf77655e8c..330ebcb7178 100644
--- a/clang/AST/StmtSerialization.cpp
+++ b/clang/AST/StmtSerialization.cpp
@@ -921,16 +921,15 @@ ObjCEncodeExpr* ObjCEncodeExpr::CreateImpl(Deserializer& D) {
void ObjcForCollectionStmt::EmitImpl(Serializer& S) const {
S.Emit(ForLoc);
- S.EmitOwnedPtr(getElement());
- S.EmitOwnedPtr(getCollection());
- S.EmitOwnedPtr(getBody());
+ S.BatchEmitOwnedPtrs(getElement(),getCollection(),getBody());
}
ObjcForCollectionStmt* ObjcForCollectionStmt::CreateImpl(Deserializer& D) {
SourceLocation ForLoc = SourceLocation::ReadVal(D);
- Stmt* Element = D.ReadOwnedPtr<Stmt>();
- Expr* Collection = D.ReadOwnedPtr<Expr>();
- Stmt* Body = D.ReadOwnedPtr<Stmt>();
+ Stmt* Element;
+ Expr* Collection;
+ Stmt* Body;
+ D.BatchReadOwnedPtrs(Element,Collection,Body);
return new ObjcForCollectionStmt(Element,Collection,Body,ForLoc);
}
OpenPOWER on IntegriCloud