diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-27 19:09:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-27 19:09:51 +0000 |
commit | dc476b87d92a740f96597a4e73d4b07f79b9999d (patch) | |
tree | 3a12669516d5e403a34706d490ce95e62aaad4e0 | |
parent | 9550dc2df2aad33e92febc0e3a15aca372639a10 (diff) |
change ++ to +1 when using random access iterators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4292 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/SparcV9/SparcV9PreSelection.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Target/SparcV9/SparcV9PreSelection.cpp b/lib/Target/SparcV9/SparcV9PreSelection.cpp index 56c34edbb7..012956220c 100644 --- a/lib/Target/SparcV9/SparcV9PreSelection.cpp +++ b/lib/Target/SparcV9/SparcV9PreSelection.cpp @@ -200,17 +200,15 @@ static Instruction* DecomposeConstantExpr(ConstantExpr* CE, 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 |