projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55eb1c4
)
elimiante a temporary vector
author
Chris Lattner
<sabre@nondot.org>
Wed, 31 Jan 2007 04:42:05 +0000
(
04:42
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 31 Jan 2007 04:42:05 +0000
(
04:42
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33694
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/ConstantFolding.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/ConstantFolding.cpp
b/lib/Analysis/ConstantFolding.cpp
index 429f225670bd2f806d6c7f34b931f1ce85a52293..8a690feed1e5930d38ed590122e94b1168f46ca5 100644
(file)
--- 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);
}
}