diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-08-21 17:37:41 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-08-21 17:37:41 +0000 |
commit | 401bb64b31ed61edb40c71461037929aede52cfc (patch) | |
tree | fc1a23b8c69baea967231c3f68e2f0b8179a9102 /llvm/lib/IR/ConstantFold.cpp | |
parent | 528d8d609229b2b59809a9c546ecf1dbf971c882 (diff) | |
download | llvm-401bb64b31ed61edb40c71461037929aede52cfc.zip llvm-401bb64b31ed61edb40c71461037929aede52cfc.tar.gz llvm-401bb64b31ed61edb40c71461037929aede52cfc.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantFold.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index 5dd075a..131c5c5 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -1999,9 +1999,8 @@ static bool isInBoundsIndices(ArrayRef<IndexTy> Idxs) { /// \brief Test whether a given ConstantInt is in-range for a SequentialType. static bool isIndexInRangeOfSequentialType(SequentialType *STy, const ConstantInt *CI) { - if (auto *PTy = dyn_cast<PointerType>(STy)) - // Only handle pointers to sized types, not pointers to functions. - return PTy->getElementType()->isSized(); + if (isa<PointerType>(STy)) + return true; uint64_t NumElements = 0; // Determine the number of elements in our sequential type. |