It is legal to index into sequential types with any integer
authorChris Lattner <sabre@nondot.org>
Tue, 25 Nov 2003 21:20:19 +0000 (21:20 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 25 Nov 2003 21:20:19 +0000 (21:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10227 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DerivedTypes.h

index 8d23df10c0be5c6be5412cf15918c41540d8a964..c0cd601e618347bee7825615f365be7e4d04ca2b 100644 (file)
@@ -309,7 +309,7 @@ public:
     return ElementType.get();
   }
   virtual bool indexValid(const Value *V) const {
-    return V->getType() == Type::LongTy;   // Must be a 'long' index
+    return V->getType()->isInteger();
   }
 
   // getIndexType() - Return the type required of indices for this composite.