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:
Anders Carlsson 2011-03-21 02:42:27 +00:00
parent d078183725
commit 701822a48e
1 changed files with 7 additions and 0 deletions

View File

@ -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;