From c44bd78a2ebc9188e02393bbd074e2b5a418b6db 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 llvm-svn: 34163 --- llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp') diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index 6878f89fffb..28b515e3faf 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/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