Bug in Support/Allocator.h

llvm::BumpPtrAllocatorImpl::Reset() looks like it has a bug.

There is this check at the top:
     if (Slabs.empty())

But what if you don't have any normal Slabs allocated but only CustomSizedSlabs.

I think this should be:

     if (Slabs.empty() && CustomSizedSlabs.empty())

Here is a real patch.

bump-ptr-allocator-fix.diff (1.09 KB)

Here is a real patch.

Please re-post to llvm-commits@cs.uiuc.edu.

I only skimmed the patch, but it looks like it's missing a
testcase. You can probably find a good spot for a unit test in

Thanks for working on this!