mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Be more restrictive with the index types we allow for sequential types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12650 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
89c6048000
commit
68056127bb
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user