aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index aa02821..4b56e15 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -4228,17 +4228,11 @@ void CGDebugInfo::EmitFuncDeclForCallSite(llvm::CallBase *CallOrInvoke,
if (Func->getSubprogram())
return;
- // Do not emit a declaration subprogram for a builtin, a function with nodebug
- // attribute, or if call site info isn't required. Also, elide declarations
- // for functions with reserved names, as call site-related features aren't
- // interesting in this case (& also, the compiler may emit calls to these
- // functions without debug locations, which makes the verifier complain).
- if (CalleeDecl->getBuiltinID() != 0 || CalleeDecl->hasAttr<NoDebugAttr>() ||
+ // Do not emit a declaration subprogram for a function with nodebug
+ // attribute, or if call site info isn't required.
+ if (CalleeDecl->hasAttr<NoDebugAttr>() ||
getCallSiteRelatedAttrs() == llvm::DINode::FlagZero)
return;
- if (CalleeDecl->isReserved(CGM.getLangOpts()) !=
- ReservedIdentifierStatus::NotReserved)
- return;
// If there is no DISubprogram attached to the function being called,
// create the one describing the function in order to have complete