From: Ted Kremenek Date: Mon, 7 Jan 2008 18:35:04 +0000 (+0000) Subject: Minor tweak to serialization of ObjcForCollectionStmt: the three owned pointers X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=205712ac9641d287e30c44db7fa994ebe3f23fe8;p=clang 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 adf77655e8..330ebcb717 100644 --- a/AST/StmtSerialization.cpp +++ b/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(); - Expr* Collection = D.ReadOwnedPtr(); - Stmt* Body = D.ReadOwnedPtr(); + Stmt* Element; + Expr* Collection; + Stmt* Body; + D.BatchReadOwnedPtrs(Element,Collection,Body); return new ObjcForCollectionStmt(Element,Collection,Body,ForLoc); }