diff --git a/lib/Support/FoldingSet.cpp b/lib/Support/FoldingSet.cpp index 6daa157af13..80140438714 100644 --- a/lib/Support/FoldingSet.cpp +++ b/lib/Support/FoldingSet.cpp @@ -170,7 +170,7 @@ FoldingSetImpl::FoldingSetImpl(unsigned Log2InitSize) : NumNodes(0) { memset(Buckets, 0, NumBuckets*sizeof(void*)); // Set the very last bucket to be a non-null "pointer". - Buckets[NumBuckets] = reinterpret_cast(-2); + Buckets[NumBuckets] = reinterpret_cast(-1); } FoldingSetImpl::~FoldingSetImpl() { delete [] Buckets;