summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-12-12 05:13:05 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-12-12 05:13:05 +0000
commit8657acc07e614b5fa7300a2a8e623c2fe36872f5 (patch)
tree6c42a47e9e8a0b89a4757780cd53f53755fd4bfe /llvm/lib/ExecutionEngine/Interpreter
parente60a0289d4f70760458b8d86a9c16af872bee490 (diff)
downloadbcm5719-llvm-8657acc07e614b5fa7300a2a8e623c2fe36872f5.tar.gz
bcm5719-llvm-8657acc07e614b5fa7300a2a8e623c2fe36872f5.zip
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. llvm-svn: 10426
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter')
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Execution.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
index 732a485d783..abade5f857a 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/llvm/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];
OpenPOWER on IntegriCloud