summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-10 19:55:17 +0000
committerChris Lattner <sabre@nondot.org>2007-02-10 19:55:17 +0000
commitc473d8e431a219a3c46cf5b469506b5f6d3d4e79 (patch)
treeddb7ec728f4f42312539b9b41230fa66fbc8dc52 /llvm/lib/ExecutionEngine
parent2230c96657dac09702bfd31931902da8e514687b (diff)
downloadbcm5719-llvm-c473d8e431a219a3c46cf5b469506b5f6d3d4e79.tar.gz
bcm5719-llvm-c473d8e431a219a3c46cf5b469506b5f6d3d4e79.zip
Privatize StructLayout::MemberOffsets, adding an accessor
llvm-svn: 34156
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/ExecutionEngine.cpp2
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Execution.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index 0fd6d461e1f..6878f89fffb 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -716,7 +716,7 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
const StructLayout *SL =
getTargetData()->getStructLayout(cast<StructType>(CPS->getType()));
for (unsigned i = 0, e = CPS->getNumOperands(); i != e; ++i)
- InitializeMemory(CPS->getOperand(i), (char*)Addr+SL->MemberOffsets[i]);
+ InitializeMemory(CPS->getOperand(i), (char*)Addr+SL->getElementOffset(i));
return;
}
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
index fe80dfddd63..936d64f4441 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -1082,7 +1082,7 @@ GenericValue Interpreter::executeGEPOperation(Value *Ptr, gep_type_iterator I,
const ConstantInt *CPU = cast<ConstantInt>(I.getOperand());
unsigned Index = unsigned(CPU->getZExtValue());
- Total += (PointerTy)SLO->MemberOffsets[Index];
+ Total += (PointerTy)SLO->getElementOffset(Index);
} else {
const SequentialType *ST = cast<SequentialType>(*I);
// Get the index number for the array... which must be long type...
OpenPOWER on IntegriCloud