]> granicus.if.org Git - clang/commitdiff
When serializing CompoundLiteralExpr, serialize out the file scope flag before
authorTed Kremenek <kremenek@apple.com>
Mon, 14 Jan 2008 18:29:39 +0000 (18:29 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 14 Jan 2008 18:29:39 +0000 (18:29 +0000)
serializing the subexpression (Init), as this results in a more efficient
encoding in the bitstream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45967 91177308-0d34-0410-b5e6-96231b3b80d8

AST/StmtSerialization.cpp

index f0a1a385c6558d6e095a9816ecc3c765f99e3cb4..545813cfba97881647067e6afeb7fb233af03931 100644 (file)
@@ -391,15 +391,15 @@ CompoundAssignOperator::CreateImpl(Deserializer& D) {
 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);
 }