From a240df2ec1b374b3e9e7f760875ffb17cd64506f Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 16 Oct 2012 07:22:28 +0000 Subject: 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 --- lib/CodeGen/CodeGenFunction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') 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(GD.getDecl()); // Check if we should generate debug info for this function. - if (CGM.getModuleDebugInfo() && !FD->hasAttr()) - DebugInfo = CGM.getModuleDebugInfo(); + if (!FD->hasAttr()) + maybeInitializeDebugInfo(); FunctionArgList Args; QualType ResTy = FD->getResultType(); -- cgit v1.2.3-18-g5258