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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45710 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/StmtSerialization.cpp b/AST/StmtSerialization.cpp
index adf7765..330ebcb 100644
--- a/AST/StmtSerialization.cpp
+++ b/AST/StmtSerialization.cpp
@@ -921,16 +921,15 @@
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);
}