]> granicus.if.org Git - clang/commitdiff
Minor tweak to serialization of ObjcForCollectionStmt: the three owned pointers
authorTed Kremenek <kremenek@apple.com>
Mon, 7 Jan 2008 18:35:04 +0000 (18:35 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 7 Jan 2008 18:35:04 +0000 (18:35 +0000)
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

AST/StmtSerialization.cpp

index adf77655e8c3644dba71c4c6741355c926580abb..330ebcb71788945859b9f4a9e1ac5830f443a9c6 100644 (file)
@@ -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);
 }