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 | 309f87e34a12e3398932e4c2c9e3c47cad0e8f0f (patch) | |
tree | 7eaa20aac008768f44abab9ce44bdd43b9ade766 /lib/Analysis/ConstantFolding.cpp | |
parent | 7f6b9d2f1a7d55f6a84a1e8078b895ce4ff66dae (diff) | |
download | external_llvm-309f87e34a12e3398932e4c2c9e3c47cad0e8f0f.zip external_llvm-309f87e34a12e3398932e4c2c9e3c47cad0e8f0f.tar.gz external_llvm-309f87e34a12e3398932e4c2c9e3c47cad0e8f0f.tar.bz2 |
completely eliminate a temporary vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34162 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | lib/Analysis/ConstantFolding.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index 1515301..6fd8ff8 100644 --- a/lib/Analysis/ConstantFolding.cpp +++ b/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); } |