[llvm] r206148 - Fix the compile from r206147 in release builds by moving a variable
Chandler Carruth
chandlerc at gmail.com
Sun Apr 13 21:46:31 PDT 2014
Author: chandlerc
Date: Sun Apr 13 23:46:30 2014
New Revision: 206148
URL: http://llvm.org/viewvc/llvm-project?rev=206148&view=rev
Log:
Fix the compile from r206147 in release builds by moving a variable
declaration outside of #ifndef NDEBUG -- its used elsewhere. Sorry for
the noise.
Modified:
llvm/trunk/include/llvm/Support/Allocator.h
Modified: llvm/trunk/include/llvm/Support/Allocator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Allocator.h?rev=206148&r1=206147&r2=206148&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Allocator.h (original)
+++ llvm/trunk/include/llvm/Support/Allocator.h Sun Apr 13 23:46:30 2014
@@ -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);
More information about the llvm-commits
mailing list