Move more of the blocks code up and out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66046 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index 8aabada..d877b17 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -501,7 +501,7 @@
 }
 
 llvm::Constant *
-CodeGenModule::GetAddrOfGlobalBlock(const BlockExpr *BE, const char * n) {
+BlockModule::GetAddrOfGlobalBlock(const BlockExpr *BE, const char * n) {
   // Generate the block descriptor.
   const llvm::Type *UnsignedLongTy = Types.ConvertType(Context.UnsignedLongTy);
   const llvm::IntegerType *IntTy = cast<llvm::IntegerType>(
@@ -534,9 +534,9 @@
   uint64_t subBlockSize, subBlockAlign;
   llvm::SmallVector<const Expr *, 8> subBlockDeclRefDecls;
   llvm::Function *Fn
-    = CodeGenFunction(*this).GenerateBlockFunction(BE, Info, subBlockSize,
-                                                   subBlockAlign,
-                                                   subBlockDeclRefDecls);
+    = CodeGenFunction(CGM).GenerateBlockFunction(BE, Info, subBlockSize,
+                                                 subBlockAlign,
+                                                 subBlockDeclRefDecls);
   assert(subBlockSize == BlockLiteralSize
          && "no imports allowed for global block");