diff options
-rw-r--r-- | include/llvm/DerivedTypes.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index b53ecd2..ffa9551 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -263,7 +263,16 @@ public: return ContainedTys[0]; } virtual bool indexValid(const Value *V) const { - return V->getType()->isInteger(); + const Type *Ty = V->getType(); + switch (Ty->getPrimitiveID()) { + case Type::IntTyID: + case Type::UIntTyID: + case Type::LongTyID: + case Type::ULongTyID: + return true; + default: + return false; + } } // Methods for support type inquiry through isa, cast, and dyn_cast: |