aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine/ExecutionEngine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-10 20:35:22 +0000
committerChris Lattner <sabre@nondot.org>2007-02-10 20:35:22 +0000
commit829621c59e9e4e2f4e15cd562688fae9f82ea549 (patch)
tree5a71cbf324c82f7bbf05b8151cee89d8d3b4583d /lib/ExecutionEngine/ExecutionEngine.cpp
parent309f87e34a12e3398932e4c2c9e3c47cad0e8f0f (diff)
downloadexternal_llvm-829621c59e9e4e2f4e15cd562688fae9f82ea549.zip
external_llvm-829621c59e9e4e2f4e15cd562688fae9f82ea549.tar.gz
external_llvm-829621c59e9e4e2f4e15cd562688fae9f82ea549.tar.bz2
eliminate use of TargetData::getIndexedOffset that takes a vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34163 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index 6878f89..28b515e 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -334,9 +334,10 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
case Instruction::GetElementPtr: {
// Compute the index
Result = getConstantValue(CE->getOperand(0));
- std::vector<Value*> Indexes(CE->op_begin()+1, CE->op_end());
+ SmallVector<Value*, 8> Indices(CE->op_begin()+1, CE->op_end());
uint64_t Offset =
- TD->getIndexedOffset(CE->getOperand(0)->getType(), Indexes);
+ TD->getIndexedOffset(CE->getOperand(0)->getType(),
+ &Indices[0], Indices.size());
if (getTargetData()->getPointerSize() == 4)
Result.Int32Val += Offset;