From 996ace13c0eca0ce1c21df9d7b84966416dd1c21 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 21 Aug 2015 17:37:41 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245712 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/ConstantFold.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/IR/ConstantFold.cpp b/lib/IR/ConstantFold.cpp index 5dd075a7690..131c5c51790 100644 --- a/lib/IR/ConstantFold.cpp +++ b/lib/IR/ConstantFold.cpp @@ -1999,9 +1999,8 @@ static bool isInBoundsIndices(ArrayRef 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(STy)) - // Only handle pointers to sized types, not pointers to functions. - return PTy->getElementType()->isSized(); + if (isa(STy)) + return true; uint64_t NumElements = 0; // Determine the number of elements in our sequential type. -- 2.34.1