TypeMetadataUtils: Simplify; spotted by Mehdi.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290264 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Peter Collingbourne 2016-12-21 19:00:47 +00:00
parent d364009440
commit fa98a04f68

View File

@ -69,8 +69,7 @@ void llvm::findDevirtualizableCallsForTypeTest(
// Find llvm.assume intrinsics for this llvm.type.test call.
for (const Use &CIU : CI->uses()) {
auto AssumeCI = dyn_cast<CallInst>(CIU.getUser());
if (AssumeCI) {
if (auto *AssumeCI = dyn_cast<CallInst>(CIU.getUser())) {
Function *F = AssumeCI->getCalledFunction();
if (F && F->getIntrinsicID() == Intrinsic::assume)
Assumes.push_back(AssumeCI);