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 | 415d3d570a5ee2d41fd7ae485395bcd4a41dae64 (patch) | |
tree | 42d12c676fa0876433d7d3fa6da27289eff0589f /clang/lib/AST/DeclBase.cpp | |
parent | d83529e8c4d99a053b0128caa79d49dc65f015d4 (diff) | |
download | bcm5719-llvm-415d3d570a5ee2d41fd7ae485395bcd4a41dae64.tar.gz bcm5719-llvm-415d3d570a5ee2d41fd7ae485395bcd4a41dae64.zip |
- 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).
llvm-svn: 57298
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r-- | clang/lib/AST/DeclBase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index db179fec3ec..b42950ffc0b 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -49,6 +49,7 @@ static unsigned nObjCPropertyDecl = 0; static unsigned nObjCPropertyImplDecl = 0; static unsigned nLinkageSpecDecl = 0; static unsigned nFileScopeAsmDecl = 0; +static unsigned nBlockDecls = 0; static bool StatSwitch = false; @@ -77,6 +78,7 @@ const char *Decl::getDeclKindName() const { case Union: return "Union"; case Class: return "Class"; case Enum: return "Enum"; + case Block: return "Block"; } } @@ -221,6 +223,7 @@ void Decl::addDeclKind(Kind k) { case ObjCPropertyImpl: nObjCPropertyImplDecl++; break; case LinkageSpec: nLinkageSpecDecl++; break; case FileScopeAsm: nFileScopeAsmDecl++; break; + case Block: nBlockDecls++; break; case ImplicitParam: case TranslationUnit: break; |