From d917fe56926f2f80665fd154eb23ca41e9df6f67 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 31 Jan 2007 04:42:05 +0000 Subject: [PATCH] elimiante a temporary vector git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33694 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ConstantFolding.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index 429f225670b..8a690feed1e 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(Ops+1, - Ops+NumOps)); + return ConstantExpr::getGetElementPtr(Ops[0], Ops+1, NumOps-1); } }