From 829621c59e9e4e2f4e15cd562688fae9f82ea549 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 10 Feb 2007 20:35:22 +0000 Subject: 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 --- lib/ExecutionEngine/ExecutionEngine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp') diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 6878f89fff..28b515e3fa 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 Indexes(CE->op_begin()+1, CE->op_end()); + SmallVector 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; -- cgit v1.2.3-18-g5258