Generate the helper function for blocks.  Now basic codegen is
starting to work for blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64570 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index bfb523b..aa5d37d 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -372,7 +372,10 @@
   }
     
   llvm::Constant *VisitBlockExpr(const BlockExpr *E) {
-    return CGM.GetAddrOfGlobalBlock(E);
+    const char *Name = "";
+    if (const NamedDecl *ND = dyn_cast<NamedDecl>(CGF->CurFuncDecl))
+      Name = ND->getNameAsString().c_str();
+    return CGM.GetAddrOfGlobalBlock(E, Name);
   }
   
   // Utility methods