Remove an unnecessary use of pointee types introduced in r194220

David Majnemer (the original author) believes this to be an impossible
condition to reach anyway, and no test cases cover this so we'll go with
that.

llvm-svn: 245712
This commit is contained in:
David Blaikie 2015-08-21 17:37:41 +00:00
parent 528d8d6092
commit 401bb64b31
1 changed files with 2 additions and 3 deletions

View File

@ -1999,9 +1999,8 @@ static bool isInBoundsIndices(ArrayRef<IndexTy> Idxs) {
/// \brief Test whether a given ConstantInt is in-range for a SequentialType. /// \brief Test whether a given ConstantInt is in-range for a SequentialType.
static bool isIndexInRangeOfSequentialType(SequentialType *STy, static bool isIndexInRangeOfSequentialType(SequentialType *STy,
const ConstantInt *CI) { const ConstantInt *CI) {
if (auto *PTy = dyn_cast<PointerType>(STy)) if (isa<PointerType>(STy))
// Only handle pointers to sized types, not pointers to functions. return true;
return PTy->getElementType()->isSized();
uint64_t NumElements = 0; uint64_t NumElements = 0;
// Determine the number of elements in our sequential type. // Determine the number of elements in our sequential type.