summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-08-21 17:37:41 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-08-21 17:37:41 +0000
commit401bb64b31ed61edb40c71461037929aede52cfc (patch)
treefc1a23b8c69baea967231c3f68e2f0b8179a9102 /llvm/lib/IR
parent528d8d609229b2b59809a9c546ecf1dbf971c882 (diff)
downloadbcm5719-llvm-401bb64b31ed61edb40c71461037929aede52cfc.tar.gz
bcm5719-llvm-401bb64b31ed61edb40c71461037929aede52cfc.zip
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')
-rw-r--r--llvm/lib/IR/ConstantFold.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index 5dd075a7690..131c5c51790 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.
OpenPOWER on IntegriCloud