aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-10-16 07:22:28 +0000
committerAlexey Samsonov <samsonov@google.com>2012-10-16 07:22:28 +0000
commita240df2ec1b374b3e9e7f760875ffb17cd64506f (patch)
tree0c50fd11eb536e89c6c9cb863924bcf5952772dd /lib/CodeGen/CGBlocks.cpp
parenta6375560645177168099f1a1d96be8fa4718aa8e (diff)
Transform pattern:
if (CGM.getModuleDebugInfo()) DebugInfo = CGM.getModuleDebugInfo() into a call: maybeInitializeDebugInfo(); This is a simplification for a possible future fix of PR13942. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index f5781090a9..33f4bf1670 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -1001,8 +1001,7 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD,
const BlockDecl *blockDecl = blockInfo.getBlockDecl();
// Check if we should generate debug info for this block function.
- if (CGM.getModuleDebugInfo())
- DebugInfo = CGM.getModuleDebugInfo();
+ maybeInitializeDebugInfo();
CurGD = GD;
BlockInfo = &blockInfo;
@@ -1207,8 +1206,7 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) {
= &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();
+ maybeInitializeDebugInfo();
FunctionDecl *FD = FunctionDecl::Create(C,
C.getTranslationUnitDecl(),
@@ -1321,8 +1319,7 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) {
"__destroy_helper_block_", &CGM.getModule());
// Check if we should generate debug info for this block destroy function.
- if (CGM.getModuleDebugInfo())
- DebugInfo = CGM.getModuleDebugInfo();
+ maybeInitializeDebugInfo();
IdentifierInfo *II
= &CGM.getContext().Idents.get("__destroy_helper_block_");