forked from OSchip/llvm-project
Don't use ++idx_begin when I actually mean idx_begin + 1, especially since we
also use *idx_begin in the same expression, giving unpredictable results. This fixes this bug: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-July/015877.html llvm-svn: 53670
This commit is contained in:
parent
a0b1ab3c0b
commit
b85cc9db19
|
@ -864,7 +864,7 @@ Value *llvm::FindInsertedValue(Value *V, const unsigned *idx_begin,
|
|||
else if (Constant *C = dyn_cast<Constant>(V)) {
|
||||
if (isa<ConstantArray>(C) || isa<ConstantStruct>(C))
|
||||
// Recursively process this constant
|
||||
return FindInsertedValue(C->getOperand(*idx_begin), ++idx_begin, idx_end,
|
||||
return FindInsertedValue(C->getOperand(*idx_begin), idx_begin + 1, idx_end,
|
||||
InsertBefore);
|
||||
} else if (InsertValueInst *I = dyn_cast<InsertValueInst>(V)) {
|
||||
// Loop the indices for the insertvalue instruction in parallel with the
|
||||
|
|
Loading…
Reference in New Issue