[cfe-commits] r127174 - /cfe/trunk/lib/CodeGen/CGBlocks.cpp

Devang Patel dpatel at apple.com
Mon Mar 7 13:53:18 PST 2011


Author: dpatel
Date: Mon Mar  7 15:53:18 2011
New Revision: 127174

URL: http://llvm.org/viewvc/llvm-project?rev=127174&view=rev
Log:
CodeGenFunction::GenerateBlockFunction() should initialize DebugInfo just like CodeGenFunction::GenerateCode()

Modified:
    cfe/trunk/lib/CodeGen/CGBlocks.cpp

Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=127174&r1=127173&r2=127174&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Mon Mar  7 15:53:18 2011
@@ -873,7 +873,10 @@
                                        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





More information about the cfe-commits mailing list