mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
For some targets pointer and int are 16-bits. Allow 16-bits as a valid index
in such cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58505 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f6a9988cea
commit
d2840fd37f
@ -1516,7 +1516,8 @@ void PointerType::typeBecameConcrete(const DerivedType *AbsTy) {
|
||||
|
||||
bool SequentialType::indexValid(const Value *V) const {
|
||||
if (const IntegerType *IT = dyn_cast<IntegerType>(V->getType()))
|
||||
return IT->getBitWidth() == 32 || IT->getBitWidth() == 64;
|
||||
return IT->getBitWidth() == 16 ||
|
||||
IT->getBitWidth() == 32 || IT->getBitWidth() == 64;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user