diff options
-rw-r--r-- | include/llvm/ADT/SmallPtrSet.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h index 48637f37a2..f1405fab9c 100644 --- a/include/llvm/ADT/SmallPtrSet.h +++ b/include/llvm/ADT/SmallPtrSet.h @@ -233,7 +233,7 @@ template<class PtrType, unsigned SmallSize> class SmallPtrSet : public SmallPtrSetImpl { // Make sure that SmallSize is a power of two, round up if not. enum { SmallSizePowTwo = NextPowerOfTwo<SmallSize>::Val }; - void *SmallArray[SmallSizePowTwo]; + void *SmallArray[SmallSizePowTwo+1]; typedef PointerLikeTypeTraits<PtrType> PtrTraits; public: SmallPtrSet() : SmallPtrSetImpl(SmallSizePowTwo) {} |