aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-10-08 18:44:00 +0000
committerSteve Naroff <snaroff@apple.com>2008-10-08 18:44:00 +0000
commit1c90bfcbd7ff5d09694acf50a32dbb716a968b61 (patch)
treeadb881fc2943d084c4dad033518cda4192a60897 /lib/AST/Decl.cpp
parente0a798ef0f13995d5f2128dd11a20f8af2d62d6a (diff)
Instantiate the BlockDecl in ActOnBlockStart() so we can use it as a DeclContext.
This required changes to attach the compound statement later on (like we do for functions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index c900a734ae..fe2e95d157 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -77,10 +77,9 @@ FunctionDecl *FunctionDecl::Create(ASTContext &C, DeclContext *DC,
}
BlockDecl *BlockDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
- ParmVarDecl **args, unsigned numargs,
- CompoundStmt *body) {
+ ParmVarDecl **args, unsigned numargs) {
void *Mem = C.getAllocator().Allocate<BlockDecl>();
- return new (Mem) BlockDecl(DC, L, args, numargs, body);
+ return new (Mem) BlockDecl(DC, L, args, numargs);
}
FieldDecl *FieldDecl::Create(ASTContext &C, SourceLocation L,