From: Chris Lattner Date: Tue, 25 Nov 2003 21:20:19 +0000 (+0000) Subject: It is legal to index into sequential types with any integer X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6c7901bd1131b9dd932b05ee372449858d485440;p=oota-llvm.git 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 --- 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.