diff options
author | Mike Stump <mrs@apple.com> | 2009-02-19 22:01:56 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-02-19 22:01:56 +0000 |
commit | b83d287bc7f47d36fb0751a481e2ef9308b37252 (patch) | |
tree | ed7d31e8981c0c922eaf3eb653f0573182275658 /lib/AST/StmtSerialization.cpp | |
parent | f084663ed01cbe382c700947908b4130fec0406a (diff) |
Add enough checking to ensure that non-constant block literals don't
appear to be constant. I'll probably redo this and throw it all away
later once we have codegen for BlockDeclRefExprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65070 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtSerialization.cpp')
-rw-r--r-- | lib/AST/StmtSerialization.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/AST/StmtSerialization.cpp b/lib/AST/StmtSerialization.cpp index a6cf01fe2b..009a2dd17a 100644 --- a/lib/AST/StmtSerialization.cpp +++ b/lib/AST/StmtSerialization.cpp @@ -1290,11 +1290,14 @@ ExtVectorElementExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C) { void BlockExpr::EmitImpl(Serializer& S) const { S.Emit(getType()); S.EmitOwnedPtr(TheBlock); + S.EmitBool(HasBlockDeclRefExprs); } BlockExpr* BlockExpr::CreateImpl(Deserializer& D, ASTContext& C) { QualType T = QualType::ReadVal(D); - return new BlockExpr(cast<BlockDecl>(D.ReadOwnedPtr<Decl>(C)),T); + BlockDecl *B = cast<BlockDecl>(D.ReadOwnedPtr<Decl>(C)); + bool H = D.ReadBool(); + return new BlockExpr(B,T,H); } void BlockDeclRefExpr::EmitImpl(Serializer& S) const { |