From 38e2496497b591db7d1c11d8f78ccff9efb71429 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. llvm-svn: 166019 --- clang/lib/CodeGen/CodeGenFunction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp') diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 5f71af8..48b349b 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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.1