It's invalid to take the one-past-the-end address of a non-array

object.

llvm-svn: 52515
This commit is contained in:
Dan Gohman 2008-06-20 00:49:21 +00:00
parent d87e813e41
commit e8512ffba6
1 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,8 @@ namespace llvm {
/// only.
inline Value *FindInsertedValue(Value *V, const unsigned Idx,
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