diff options
author | Steve Naroff <snaroff@apple.com> | 2008-10-08 17:01:13 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-10-08 17:01:13 +0000 |
commit | 56ee6896f2efebffb4a2cce5a7610cdf1eddbbbe (patch) | |
tree | 27e5894e15c4faaea557fd1f88702f626aea2fed /lib/AST/DeclSerialization.cpp | |
parent | 178927517fa09ddbb04dc8ef725b5716c18aae21 (diff) |
- Add BlockDecl AST node.
- Modify BlockExpr to reference the BlockDecl.
This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?).
Still some follow-up work to finish this (forthcoming).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclSerialization.cpp')
-rw-r--r-- | lib/AST/DeclSerialization.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/AST/DeclSerialization.cpp b/lib/AST/DeclSerialization.cpp index 3f36e3ac89..2ebcb76fbf 100644 --- a/lib/AST/DeclSerialization.cpp +++ b/lib/AST/DeclSerialization.cpp @@ -441,6 +441,22 @@ FunctionDecl* FunctionDecl::CreateImpl(Deserializer& D, ASTContext& C) { return decl; } +void BlockDecl::EmitImpl(Serializer& S) const { + // FIXME: what about arguments? + S.Emit(getCaretLocation()); + S.EmitOwnedPtr(Body); +} + +BlockDecl* BlockDecl::CreateImpl(Deserializer& D, ASTContext& C) { + QualType Q = QualType::ReadVal(D); + SourceLocation L = SourceLocation::ReadVal(D); + /*CompoundStmt* BodyStmt = cast<CompoundStmt>(*/D.ReadOwnedPtr<Stmt>(C)/*)*/; + assert(0 && "Cannot deserialize BlockBlockExpr yet"); + // FIXME: need to handle parameters. + //return new BlockBlockExpr(L, Q, BodyStmt); + return 0; +} + //===----------------------------------------------------------------------===// // RecordDecl Serialization. //===----------------------------------------------------------------------===// |