[llvm-commits] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp

Chris Lattner sabre at nondot.org
Sat Feb 10 12:35:39 PST 2007



Changes in directory llvm/lib/ExecutionEngine:

ExecutionEngine.cpp updated: 1.104 -> 1.105
---
Log message:

eliminate use of TargetData::getIndexedOffset that takes a vector


---
Diffs of the changes:  (+3 -2)

 ExecutionEngine.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.104 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.105
--- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.104	Sat Feb 10 13:55:17 2007
+++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp	Sat Feb 10 14:35:22 2007
@@ -334,9 +334,10 @@
     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;






More information about the llvm-commits mailing list