From 6c7901bd1131b9dd932b05ee372449858d485440 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 25 Nov 2003 21:20:19 +0000 Subject: [PATCH] It is legal to index into sequential types with any integer git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10227 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/DerivedTypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index 8d23df10c0b..c0cd601e618 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -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. -- 2.34.1