1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Handle another case that Frits suggested.

llvm-svn: 128068
This commit is contained in:
Anders Carlsson 2011-03-22 03:21:01 +00:00
parent 35f357b7d0
commit 8f934f6652

View File

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