aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-03-07 21:53:18 +0000
committerDevang Patel <dpatel@apple.com>2011-03-07 21:53:18 +0000
commit6d1155be2aca28659a47fbe612222845811ff2a3 (patch)
treefb11e6f2a6009a0a6b6f28278116fe2d2902b6bf /lib/CodeGen/CGBlocks.cpp
parentd97cec3deb6e34f0f9d4f5f8ec11b28e44812727 (diff)
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
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp5
1 files changed, 4 insertions, 1 deletions
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