diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index 08878aef787..9e567e567af 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -285,8 +285,8 @@ private: void DeallocateCustomSizedSlabs() { for (auto &PtrAndSize : CustomSizedSlabs) { void *Ptr = PtrAndSize.first; -#ifndef NDEBUG size_t Size = PtrAndSize.second; +#ifndef NDEBUG // Poison the memory so stale pointers crash sooner. Note we must // preserve the Size and NextPtr fields at the beginning. sys::Memory::setRangeWritable(Ptr, Size);