diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-04-26 17:14:35 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-04-26 17:14:35 +0000 |
commit | d2d18c3dc46917183cd3c97b651975566d943e72 (patch) | |
tree | 9c93e7b6daa166bd676e68022e6881ef08ad7e4e /lib/VMCore | |
parent | 3d55fb9b43fdba6916975f323fa7cea8a8d1f132 (diff) | |
download | external_llvm-d2d18c3dc46917183cd3c97b651975566d943e72.zip external_llvm-d2d18c3dc46917183cd3c97b651975566d943e72.tar.gz external_llvm-d2d18c3dc46917183cd3c97b651975566d943e72.tar.bz2 |
Any size of integral indices are allowed in gep for indexing into sequential types. Also adding a test case to check the indices type allowed into struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Type.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index c85395f..4a53fcf 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -1410,9 +1410,8 @@ void PointerType::typeBecameConcrete(const DerivedType *AbsTy) { } bool SequentialType::indexValid(const Value *V) const { - if (const IntegerType *IT = dyn_cast<IntegerType>(V->getType())) - return IT->getBitWidth() == 16 || IT->getBitWidth() == 32 || - IT->getBitWidth() == 64; + if (isa<IntegerType>(V->getType())) + return true; return false; } |