diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2008-10-31 10:26:20 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2008-10-31 10:26:20 +0000 |
commit | d2840fd37f698f111a4386c44f63fda74033359e (patch) | |
tree | c45d921bcb8002d180acf85745c8e15b97f55089 | |
parent | f6a9988ceab0ca660fa4f4e89d8d683f487118eb (diff) |
For some targets pointer and int are 16-bits. Allow 16-bits as a valid index
in such cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58505 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/Type.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index be21194979..14f09f0456 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -1516,7 +1516,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() == 32 || IT->getBitWidth() == 64; + return IT->getBitWidth() == 16 || + IT->getBitWidth() == 32 || IT->getBitWidth() == 64; return false; } |