[llvm-commits] CVS: llvm/lib/CodeGen/PreOpts/PreSelection.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Oct 27 13:11:00 PST 2002
Changes in directory llvm/lib/CodeGen/PreOpts:
PreSelection.cpp updated: 1.4 -> 1.5
---
Log message:
change ++ to +1 when using random access iterators
---
Diffs of the changes:
Index: llvm/lib/CodeGen/PreOpts/PreSelection.cpp
diff -u llvm/lib/CodeGen/PreOpts/PreSelection.cpp:1.4 llvm/lib/CodeGen/PreOpts/PreSelection.cpp:1.5
--- llvm/lib/CodeGen/PreOpts/PreSelection.cpp:1.4 Sun Oct 13 14:39:11 2002
+++ llvm/lib/CodeGen/PreOpts/PreSelection.cpp Sun Oct 27 13:09:51 2002
@@ -200,17 +200,15 @@
return new CastInst(getArg1, CE->getType(), "constantCast",&insertBefore);
case Instruction::GetElementPtr:
-# ifndef NDEBUG
- assert(find_if(++CE->op_begin(), CE->op_end(),nonConstant) == CE->op_end()
+ assert(find_if(CE->op_begin()+1, CE->op_end(),nonConstant) == CE->op_end()
&& "All indices in ConstantExpr getelementptr must be constant!");
-# endif
getArg1 = CE->getOperand(0);
if (ConstantExpr* CEarg = dyn_cast<ConstantExpr>(getArg1))
getArg1 = DecomposeConstantExpr(CEarg, insertBefore);
else if (GetElementPtrInst* gep = getGlobalAddr(getArg1, insertBefore))
getArg1 = gep;
return new GetElementPtrInst(getArg1,
- std::vector<Value*>(++CE->op_begin(), CE->op_end()),
+ std::vector<Value*>(CE->op_begin()+1, CE->op_end()),
"constantGEP", &insertBefore);
default: // must be a binary operator
More information about the llvm-commits
mailing list