diff options
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/Execution.cpp')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Execution.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 732a485d78..abade5f857 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -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]; |