[llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Thu Dec 11 23:14:01 PST 2003
Changes in directory llvm/lib/ExecutionEngine/Interpreter:
Execution.cpp updated: 1.117 -> 1.118
---
Log message:
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.
---
Diffs of the changes: (+1 -2)
Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.117 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.118
--- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.117 Wed Dec 10 18:22:59 2003
+++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Thu Dec 11 23:13:05 2003
@@ -706,8 +706,7 @@
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];
More information about the llvm-commits
mailing list