mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-14 17:34:41 +00:00
Since we are using a gep_type_iterator, we apparently must get the type
index by using I.getOperand() here. This was failing an assertion on basically every struct access. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10426 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
246372f35d
commit
2798cd077a
@ -706,8 +706,7 @@ GenericValue Interpreter::executeGEPOperation(Value *Ptr, gep_type_iterator I,
|
||||
if (const StructType *STy = dyn_cast<StructType>(*I)) {
|
||||
const StructLayout *SLO = TD.getStructLayout(STy);
|
||||
|
||||
// Indices must be ubyte constants...
|
||||
const ConstantUInt *CPU = cast<ConstantUInt>(*I);
|
||||
const ConstantUInt *CPU = cast<ConstantUInt>(I.getOperand());
|
||||
unsigned Index = CPU->getValue();
|
||||
|
||||
Total += SLO->MemberOffsets[Index];
|
||||
|
Loading…
x
Reference in New Issue
Block a user