diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-10-16 07:22:28 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-10-16 07:22:28 +0000 |
commit | a240df2ec1b374b3e9e7f760875ffb17cd64506f (patch) | |
tree | 0c50fd11eb536e89c6c9cb863924bcf5952772dd /lib/CodeGen/CodeGenFunction.cpp | |
parent | a6375560645177168099f1a1d96be8fa4718aa8e (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/CodeGenFunction.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 5f71af8082..48b349b066 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -493,8 +493,8 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, const FunctionDecl *FD = cast<FunctionDecl>(GD.getDecl()); // Check if we should generate debug info for this function. - if (CGM.getModuleDebugInfo() && !FD->hasAttr<NoDebugAttr>()) - DebugInfo = CGM.getModuleDebugInfo(); + if (!FD->hasAttr<NoDebugAttr>()) + maybeInitializeDebugInfo(); FunctionArgList Args; QualType ResTy = FD->getResultType(); |