forked from OSchip/llvm-project
It's invalid to take the one-past-the-end address of a non-array
object. llvm-svn: 52515
This commit is contained in:
parent
d87e813e41
commit
e8512ffba6
|
@ -67,7 +67,8 @@ namespace llvm {
|
||||||
/// only.
|
/// only.
|
||||||
inline Value *FindInsertedValue(Value *V, const unsigned Idx,
|
inline Value *FindInsertedValue(Value *V, const unsigned Idx,
|
||||||
Instruction *InsertBefore = 0) {
|
Instruction *InsertBefore = 0) {
|
||||||
return FindInsertedValue(V, &Idx, &Idx + 1, InsertBefore);
|
const unsigned Idxs[1] = { Idx };
|
||||||
|
return FindInsertedValue(V, &Idxs[0], &Idxs[1], InsertBefore);
|
||||||
}
|
}
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue