mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
[opaque pointer type] Change GetElementPtrInst::getIndexedType to take the pointee type
This pushes the use of PointerType::getElementType up into several callers - I'll essentially just have to keep pushing that up the stack until I can eliminate every call to it... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233604 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -681,8 +681,9 @@ static Constant *CastGEPIndices(ArrayRef<Constant *> Ops, Type *ResultTy,
|
||||
for (unsigned i = 1, e = Ops.size(); i != e; ++i) {
|
||||
if ((i == 1 ||
|
||||
!isa<StructType>(GetElementPtrInst::getIndexedType(
|
||||
Ops[0]->getType(),
|
||||
Ops.slice(1, i - 1)))) &&
|
||||
cast<PointerType>(Ops[0]->getType()->getScalarType())
|
||||
->getElementType(),
|
||||
Ops.slice(1, i - 1)))) &&
|
||||
Ops[i]->getType() != IntPtrTy) {
|
||||
Any = true;
|
||||
NewIdxs.push_back(ConstantExpr::getCast(CastInst::getCastOpcode(Ops[i],
|
||||
|
Reference in New Issue
Block a user