[compiler-rt] r331477 - [sanitizer] Remove unused 32-bit allocator TransferBatch parameter

Kostya Kortchinsky via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 12:14:07 PDT 2018


Author: cryptoad
Date: Thu May  3 12:14:07 2018
New Revision: 331477

URL: http://llvm.org/viewvc/llvm-project?rev=331477&view=rev
Log:
[sanitizer] Remove unused 32-bit allocator TransferBatch parameter

Summary:
NFC. Remove an unused parameter in
`SizeClassAllocator32::TransferBatch::SetFromArray`, and thus get rid of the
compilation warning.

Reviewers: alekseyshl, vitalybuka

Reviewed By: vitalybuka

Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D46397

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_local_cache.h
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_primary32.h

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_local_cache.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_local_cache.h?rev=331477&r1=331476&r2=331477&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_local_cache.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_local_cache.h Thu May  3 12:14:07 2018
@@ -262,8 +262,7 @@ struct SizeClassAllocator32LocalCache {
     // TODO(alekseys): Figure out how to do it without allocating a new batch.
     if (UNLIKELY(!b))
       DieOnFailure::OnOOM();
-    b->SetFromArray(allocator->GetRegionBeginBySizeClass(class_id),
-                    &c->batch[first_idx_to_drain], count);
+    b->SetFromArray(&c->batch[first_idx_to_drain], count);
     c->count -= count;
     allocator->DeallocateBatch(&stats_, class_id, b);
   }

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_primary32.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_primary32.h?rev=331477&r1=331476&r2=331477&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_primary32.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_primary32.h Thu May  3 12:14:07 2018
@@ -63,7 +63,7 @@ class SizeClassAllocator32 {
 
   struct TransferBatch {
     static const uptr kMaxNumCached = SizeClassMap::kMaxNumCachedHint - 2;
-    void SetFromArray(uptr region_beg_unused, void *batch[], uptr count) {
+    void SetFromArray(void *batch[], uptr count) {
       count_ = count;
       CHECK_LE(count_, kMaxNumCached);
       for (uptr i = 0; i < count; i++)




More information about the llvm-commits mailing list