forked from OSchip/llvm-project
As suggested by Nick Lewycky, ignore debugging intrinsics when trying to decide whether a destructor is empty or not.
llvm-svn: 127985
This commit is contained in:
parent
d078183725
commit
701822a48e
|
@ -2742,6 +2742,13 @@ static bool cxxDtorIsEmpty(const Function &Fn,
|
|||
if (!CalledFn)
|
||||
return false;
|
||||
|
||||
if (unsigned IntrinsicID = CalledFn->getIntrinsicID()) {
|
||||
// Ignore debug intrinsics.
|
||||
if (IntrinsicID == llvm::Intrinsic::dbg_declare ||
|
||||
IntrinsicID == llvm::Intrinsic::dbg_value)
|
||||
continue;
|
||||
}
|
||||
|
||||
// Don't treat recursive functions as empty.
|
||||
if (!CalledFunctions.insert(CalledFn))
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue