[llvm-commits] [llvm] r52515 - /llvm/trunk/include/llvm/Analysis/ValueTracking.h
Dan Gohman
gohman at apple.com
Thu Jun 19 17:49:21 PDT 2008
Author: djg
Date: Thu Jun 19 19:49:21 2008
New Revision: 52515
URL: http://llvm.org/viewvc/llvm-project?rev=52515&view=rev
Log:
It's invalid to take the one-past-the-end address of a non-array
object.
Modified:
llvm/trunk/include/llvm/Analysis/ValueTracking.h
Modified: llvm/trunk/include/llvm/Analysis/ValueTracking.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ValueTracking.h?rev=52515&r1=52514&r2=52515&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ValueTracking.h (original)
+++ llvm/trunk/include/llvm/Analysis/ValueTracking.h Thu Jun 19 19:49:21 2008
@@ -67,7 +67,8 @@
/// 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
More information about the llvm-commits
mailing list