[cfe-commits] r45710 - /cfe/trunk/AST/StmtSerialization.cpp

Ted Kremenek kremenek at apple.com
Mon Jan 7 10:35:05 PST 2008


Author: kremenek
Date: Mon Jan  7 12:35:04 2008
New Revision: 45710

URL: http://llvm.org/viewvc/llvm-project?rev=45710&view=rev
Log:
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.

Modified:
    cfe/trunk/AST/StmtSerialization.cpp

Modified: cfe/trunk/AST/StmtSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/StmtSerialization.cpp?rev=45710&r1=45709&r2=45710&view=diff

==============================================================================
--- cfe/trunk/AST/StmtSerialization.cpp (original)
+++ cfe/trunk/AST/StmtSerialization.cpp Mon Jan  7 12:35:04 2008
@@ -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);
 }
 





More information about the cfe-commits mailing list