]> granicus.if.org Git - clang/commitdiff
CodeGenFunction::GenerateBlockFunction() should initialize DebugInfo just like CodeGe...
authorDevang Patel <dpatel@apple.com>
Mon, 7 Mar 2011 21:53:18 +0000 (21:53 +0000)
committerDevang Patel <dpatel@apple.com>
Mon, 7 Mar 2011 21:53:18 +0000 (21:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127174 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBlocks.cpp

index c11c264d342748b484ef766fb884b3a42b4cf69d..aace5bb6f5fbf75fd013d311a926cc73bab6be12 100644 (file)
@@ -873,7 +873,10 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD,
                                        const DeclMapTy &ldm) {
   const BlockDecl *blockDecl = blockInfo.getBlockDecl();
 
-  DebugInfo = getDebugInfo();
+  // Check if we should generate debug info for this block function.
+  if (CGM.getModuleDebugInfo())
+    DebugInfo = CGM.getModuleDebugInfo();
+
   BlockInfo = &blockInfo;
 
   // Arrange for local static and local extern declarations to appear