elimiante a temporary vector

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33694 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-01-31 04:42:05 +00:00
parent 55eb1c47de
commit d917fe5692

View File

@ -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);
}
}