aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-05-02 20:37:08 +0000
committerDevang Patel <dpatel@apple.com>2011-05-02 20:37:08 +0000
commit58dc5ca0841900b197de7733197196f435bf0cc3 (patch)
treea35242213b2be08e93fe92e48274439a80bfdb51 /lib/CodeGen/CGBlocks.cpp
parentb5a03b6217cd6c3eecdc1aa4df03060cf51ac942 (diff)
Emit debug info for __destroy_helper_block_ and __copy_helper_block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index 99a69a4f4a..f26d79c066 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -1063,6 +1063,10 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) {
IdentifierInfo *II
= &CGM.getContext().Idents.get("__copy_helper_block_");
+ // Check if we should generate debug info for this block helper function.
+ if (CGM.getModuleDebugInfo())
+ DebugInfo = CGM.getModuleDebugInfo();
+
FunctionDecl *FD = FunctionDecl::Create(C,
C.getTranslationUnitDecl(),
SourceLocation(),
@@ -1150,6 +1154,10 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) {
llvm::Function::Create(LTy, llvm::GlobalValue::InternalLinkage,
"__destroy_helper_block_", &CGM.getModule());
+ // Check if we should generate debug info for this block destroy function.
+ if (CGM.getModuleDebugInfo())
+ DebugInfo = CGM.getModuleDebugInfo();
+
IdentifierInfo *II
= &CGM.getContext().Idents.get("__destroy_helper_block_");