Fix the compile from r206147 in release builds by moving a variable
authorChandler Carruth <chandlerc@gmail.com>
Mon, 14 Apr 2014 04:46:30 +0000 (04:46 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 14 Apr 2014 04:46:30 +0000 (04:46 +0000)
declaration outside of #ifndef NDEBUG -- its used elsewhere. Sorry for
the noise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206148 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Allocator.h

index 08878aef7879c7ad98fef1aea339280ecd8de4d0..9e567e567af0ff3f61a5df403ad54ae83bbf1af8 100644 (file)
@@ -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);