diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-10 20:33:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-10 20:33:15 +0000 |
commit | b402e74fcd68029c29230597fc9386edb389b41d (patch) | |
tree | f15c1470e54931122532af358e154fef4407a17a | |
parent | 83dfca816c1d1fbb6284a8e43b3a1ee608a6c14f (diff) | |
download | bcm5719-llvm-b402e74fcd68029c29230597fc9386edb389b41d.tar.gz bcm5719-llvm-b402e74fcd68029c29230597fc9386edb389b41d.zip |
completely eliminate a temporary vector
llvm-svn: 34162
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index 1515301a77a..6fd8ff8b563 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -133,8 +133,8 @@ static Constant *SymbolicallyEvaluateGEP(Constant** Ops, unsigned NumOps, break; } if (isFoldableGEP) { - std::vector<Value*> NewOps(Ops+1, Ops+NumOps); - uint64_t Offset = TD->getIndexedOffset(Ptr->getType(), NewOps); + uint64_t Offset = TD->getIndexedOffset(Ptr->getType(), + (Value**)Ops+1, NumOps-1); Constant *C = ConstantInt::get(TD->getIntPtrType(), Offset); return ConstantExpr::getIntToPtr(C, ResultTy); } |