aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-23 07:18:56 +0000
committerChris Lattner <sabre@nondot.org>2009-04-23 07:18:56 +0000
commit4863db4266d066617a1e5ad7c0f3f28c7995c61b (patch)
tree5c0fa9d2bcce609c5938977bc6865401a3978572 /lib/CodeGen/CGBlocks.cpp
parent9396dcf9699541f54bc3990c0dfbaa929464f5df (diff)
fix a problem producing debug info with global blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69875 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index a042c6a4ed..8ab4a44f40 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -672,8 +672,9 @@ CodeGenFunction::GenerateBlockFunction(const BlockExpr *BExpr,
CGM.SetInternalFunctionAttributes(BD, Fn, FI);
- StartFunction(OuterFuncDecl, ResultType, Fn, Args,
+ StartFunction(BD, ResultType, Fn, Args,
BExpr->getBody()->getLocEnd());
+ CurFuncDecl = OuterFuncDecl;
CurCodeDecl = BD;
EmitStmt(BExpr->getBody());
FinishFunction(cast<CompoundStmt>(BExpr->getBody())->getRBracLoc());