1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-01-15 07:34:33 +00:00

Handle another case that Frits suggested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128068 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anders Carlsson 2011-03-22 03:21:01 +00:00
parent cb3c5d8e3e
commit 807bc2a381

@ -2746,11 +2746,13 @@ static bool cxxDtorIsEmpty(const Function &Fn,
if (!CalledFn)
return false;
SmallPtrSet<const Function *, 8> NewCalledFunctions(CalledFunctions);
// Don't treat recursive functions as empty.
if (!CalledFunctions.insert(CalledFn))
if (!NewCalledFunctions.insert(CalledFn))
return false;
if (!cxxDtorIsEmpty(*CalledFn, CalledFunctions))
if (!cxxDtorIsEmpty(*CalledFn, NewCalledFunctions))
return false;
} else if (isa<ReturnInst>(*I))
return true;