From: Devang Patel Date: Mon, 7 Mar 2011 21:53:18 +0000 (+0000) Subject: CodeGenFunction::GenerateBlockFunction() should initialize DebugInfo just like CodeGe... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d1155be2aca28659a47fbe612222845811ff2a3;p=clang CodeGenFunction::GenerateBlockFunction() should initialize DebugInfo just like CodeGenFunction::GenerateCode() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127174 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index c11c264d34..aace5bb6f5 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -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