[llvm-commits] CVS: llvm/lib/Analysis/ConstantFolding.cpp
Chris Lattner
sabre at nondot.org
Sat Feb 10 12:33:31 PST 2007
Changes in directory llvm/lib/Analysis:
ConstantFolding.cpp updated: 1.17 -> 1.18
---
Log message:
completely eliminate a temporary vector
---
Diffs of the changes: (+2 -2)
ConstantFolding.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/Analysis/ConstantFolding.cpp
diff -u llvm/lib/Analysis/ConstantFolding.cpp:1.17 llvm/lib/Analysis/ConstantFolding.cpp:1.18
--- llvm/lib/Analysis/ConstantFolding.cpp:1.17 Sat Feb 10 13:55:17 2007
+++ llvm/lib/Analysis/ConstantFolding.cpp Sat Feb 10 14:33:15 2007
@@ -133,8 +133,8 @@
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);
}
More information about the llvm-commits
mailing list