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

Ted Kremenek kremenek at apple.com
Mon Jan 14 10:29:42 PST 2008


Author: kremenek
Date: Mon Jan 14 12:29:39 2008
New Revision: 45967

URL: http://llvm.org/viewvc/llvm-project?rev=45967&view=rev
Log:
When serializing CompoundLiteralExpr, serialize out the file scope flag before
serializing the subexpression (Init), as this results in a more efficient
encoding in the bitstream.

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=45967&r1=45966&r2=45967&view=diff

==============================================================================
--- cfe/trunk/AST/StmtSerialization.cpp (original)
+++ cfe/trunk/AST/StmtSerialization.cpp Mon Jan 14 12:29:39 2008
@@ -391,15 +391,15 @@
 void CompoundLiteralExpr::EmitImpl(Serializer& S) const {
   S.Emit(getType());
   S.Emit(getLParenLoc());
-  S.EmitOwnedPtr(Init);
   S.EmitBool(isFileScope());
+  S.EmitOwnedPtr(Init);
 }
 
 CompoundLiteralExpr* CompoundLiteralExpr::CreateImpl(Deserializer& D) {
   QualType Q = QualType::ReadVal(D);
   SourceLocation L = SourceLocation::ReadVal(D);
-  Expr* Init = D.ReadOwnedPtr<Expr>();
   bool fileScope = D.ReadBool();
+  Expr* Init = D.ReadOwnedPtr<Expr>();
   return new CompoundLiteralExpr(L, Q, Init, fileScope);
 }
 





More information about the cfe-commits mailing list