diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-20 00:49:21 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-20 00:49:21 +0000 |
commit | 65c6795af41ffd9c2944f94a63aa70f16f88fe80 (patch) | |
tree | f030c35b6fb76950c65bdd3c84f84e1939ffb3e5 /include/llvm/Analysis | |
parent | 09ef00f97976b6bc745b804baa6dec1ee79fd343 (diff) | |
download | external_llvm-65c6795af41ffd9c2944f94a63aa70f16f88fe80.zip external_llvm-65c6795af41ffd9c2944f94a63aa70f16f88fe80.tar.gz external_llvm-65c6795af41ffd9c2944f94a63aa70f16f88fe80.tar.bz2 |
It's invalid to take the one-past-the-end address of a non-array
object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/ValueTracking.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h index 73f8771..e2f7634 100644 --- a/include/llvm/Analysis/ValueTracking.h +++ b/include/llvm/Analysis/ValueTracking.h @@ -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 |