diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-31 04:42:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-31 04:42:05 +0000 |
commit | d917fe56926f2f80665fd154eb23ca41e9df6f67 (patch) | |
tree | 4d59901629f1fc51906e4204123f52fc598e31fb /lib/Analysis/ConstantFolding.cpp | |
parent | 55eb1c47de30a6b4e8707b6392e878e32a6583e9 (diff) |
elimiante a temporary vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | lib/Analysis/ConstantFolding.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index 429f225670..8a690feed1 100644 --- a/lib/Analysis/ConstantFolding.cpp +++ b/lib/Analysis/ConstantFolding.cpp @@ -245,9 +245,7 @@ Constant *llvm::ConstantFoldInstOperands(const Instruction* I, if (Constant *C = SymbolicallyEvaluateGEP(Ops, NumOps, I->getType(), TD)) return C; - return ConstantExpr::getGetElementPtr(Ops[0], - std::vector<Constant*>(Ops+1, - Ops+NumOps)); + return ConstantExpr::getGetElementPtr(Ops[0], Ops+1, NumOps-1); } } |