From 34bc18b97c9f316df093bae7adb3b2a0eb7ee57c Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 14 Jan 2008 18:29:39 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45967 91177308-0d34-0410-b5e6-96231b3b80d8 --- AST/StmtSerialization.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AST/StmtSerialization.cpp b/AST/StmtSerialization.cpp index f0a1a385c6..545813cfba 100644 --- a/AST/StmtSerialization.cpp +++ b/AST/StmtSerialization.cpp @@ -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(); bool fileScope = D.ReadBool(); + Expr* Init = D.ReadOwnedPtr(); return new CompoundLiteralExpr(L, Q, Init, fileScope); } -- 2.50.1