diff options
author | Dan Gohman <gohman@apple.com> | 2008-08-22 16:07:55 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-08-22 16:07:55 +0000 |
commit | 1501cdbf63cff3afd92df6cd249096770334b268 (patch) | |
tree | 4bd8c7134277e2a860214aa80bb833260a8337b7 /include/llvm/ADT/SmallVector.h | |
parent | 969a46a948414734f5bc01994e54d88d153cb3fb (diff) | |
download | llvm-1501cdbf63cff3afd92df6cd249096770334b268.tar.gz llvm-1501cdbf63cff3afd92df6cd249096770334b268.tar.bz2 llvm-1501cdbf63cff3afd92df6cd249096770334b268.tar.xz |
Fix SmallVector's size calculation so that a size of 0 is
handled correctly, and change a few SmallVector uses to use
size 0 to more clearly reflect their intent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/SmallVector.h')
-rw-r--r-- | include/llvm/ADT/SmallVector.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 05952a4490..fdecb6c448 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -477,7 +477,7 @@ class SmallVector : public SmallVectorImpl<T> { // NumInlineEltsElts - The number of elements actually in this array. There // is already one in the parent class, and we have to round up to avoid // having a zero-element array. - NumInlineEltsElts = (MinUs - 1) > 0 ? (MinUs - 1) : 1, + NumInlineEltsElts = MinUs > 1 ? (MinUs - 1) : 1, // NumTsAvailable - The number of T's we actually have space for, which may // be more than N due to rounding. |