diff options
author | Anders Carlsson <andersca@mac.com> | 2009-02-24 04:19:41 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-02-24 04:19:41 +0000 |
commit | b9c9e1d16f193ca0f2f5f370bf056737d6d3bb6a (patch) | |
tree | 47616f0eb936ac27ea9d231f18a7ec401cf9491a | |
parent | 18e91257e49298267ac242afc3143ab60670c844 (diff) | |
download | bcm5719-llvm-b9c9e1d16f193ca0f2f5f370bf056737d6d3bb6a.tar.gz bcm5719-llvm-b9c9e1d16f193ca0f2f5f370bf056737d6d3bb6a.zip |
Pass the CodeGenModule object to GenerateBlockFunction, instead of *this (which will call the copy constructor).
Also, since we're creating a new CodeGenFunction object for each block function, we don't need to clear the BreakContinueStack.
llvm-svn: 65371
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 5c09e4b2d55..163046ee589 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -154,7 +154,7 @@ llvm::Constant *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) { BlockInfo Info(0, Name); uint64_t subBlockSize; llvm::Function *Fn - = CodeGenFunction(*this).GenerateBlockFunction(BE, Info, subBlockSize); + = CodeGenFunction(CGM).GenerateBlockFunction(BE, Info, subBlockSize); Elts.push_back(Fn); // __descriptor @@ -412,11 +412,6 @@ llvm::Function *CodeGenFunction::GenerateBlockFunction(const BlockExpr *Expr, const BlockDecl *BD = Expr->getBlockDecl(); - // FIXME: there are tons of variables in CGF that are copied, we probably - // don't want many of them, any of them. When we trim that, this can go away. - // Help ensure no control flow in or out of the block. - BreakContinueStack.clear(); - // FIXME: This leaks ImplicitParamDecl *SelfDecl = ImplicitParamDecl::Create(getContext(), 0, |