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
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index a042c6a..8ab4a44 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -672,8 +672,9 @@
 
   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());