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 | 38e2496497b591db7d1c11d8f78ccff9efb71429 (patch) | |
tree | 9064fc8d6f0a33e6e1a4e9916c88773441327280 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | e59a920b0c41c1e7e36a5c8d9d609aad87e4ec1e (diff) | |
download | bcm5719-llvm-38e2496497b591db7d1c11d8f78ccff9efb71429.tar.gz bcm5719-llvm-38e2496497b591db7d1c11d8f78ccff9efb71429.zip |
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 5f71af80827..48b349b0667 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<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(); |