There are no vectors of pointer or arrays, so we don't need to check vector

elements for type equivalence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky 2011-01-26 08:50:18 +00:00
parent 464a4f349c
commit 388f4918fb

View File

@ -295,6 +295,7 @@ bool FunctionComparator::isEquivalentType(const Type *Ty1,
// Fall through in Release mode.
case Type::IntegerTyID:
case Type::OpaqueTyID:
case Type::VectorTyID:
// Ty1 == Ty2 would have returned true earlier.
return false;
@ -353,13 +354,6 @@ bool FunctionComparator::isEquivalentType(const Type *Ty1,
return ATy1->getNumElements() == ATy2->getNumElements() &&
isEquivalentType(ATy1->getElementType(), ATy2->getElementType());
}
case Type::VectorTyID: {
const VectorType *VTy1 = cast<VectorType>(Ty1);
const VectorType *VTy2 = cast<VectorType>(Ty2);
return VTy1->getNumElements() == VTy2->getNumElements() &&
isEquivalentType(VTy1->getElementType(), VTy2->getElementType());
}
}
}