diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-01-14 18:29:39 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-01-14 18:29:39 +0000 |
commit | 34bc18b97c9f316df093bae7adb3b2a0eb7ee57c (patch) | |
tree | 953ff01b0d5b606c131d66a1ae77fad91b5bfb9c | |
parent | e9b12198c4cc7f5687960100351b4af006c14469 (diff) |
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
-rw-r--r-- | AST/StmtSerialization.cpp | 4 |
1 files 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<Expr>(); bool fileScope = D.ReadBool(); + Expr* Init = D.ReadOwnedPtr<Expr>(); return new CompoundLiteralExpr(L, Q, Init, fileScope); } |