From fa58f32754d249440850ad41b74072865256fa74 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 24 May 2023 13:23:10 -0700 Subject: [PATCH] [NFC][HWASAN] Rename AllocatorSwallowThreadLocalCache --- compiler-rt/lib/hwasan/hwasan_allocator.cpp | 2 +- compiler-rt/lib/hwasan/hwasan_allocator.h | 2 +- compiler-rt/lib/hwasan/hwasan_thread.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler-rt/lib/hwasan/hwasan_allocator.cpp b/compiler-rt/lib/hwasan/hwasan_allocator.cpp index e43c0990c55fc..b81f1e353af4e 100644 --- a/compiler-rt/lib/hwasan/hwasan_allocator.cpp +++ b/compiler-rt/lib/hwasan/hwasan_allocator.cpp @@ -165,7 +165,7 @@ void HwasanAllocatorLock() { allocator.ForceLock(); } void HwasanAllocatorUnlock() { allocator.ForceUnlock(); } -void AllocatorSwallowThreadLocalCache(AllocatorCache *cache) { +void AllocatorThreadFinish(AllocatorCache *cache) { allocator.SwallowCache(cache); } diff --git a/compiler-rt/lib/hwasan/hwasan_allocator.h b/compiler-rt/lib/hwasan/hwasan_allocator.h index ecf3f6816fc7e..0168b49d9df78 100644 --- a/compiler-rt/lib/hwasan/hwasan_allocator.h +++ b/compiler-rt/lib/hwasan/hwasan_allocator.h @@ -88,7 +88,7 @@ typedef SizeClassAllocator64 PrimaryAllocator; typedef CombinedAllocator Allocator; typedef Allocator::AllocatorCache AllocatorCache; -void AllocatorSwallowThreadLocalCache(AllocatorCache *cache); +void AllocatorThreadFinish(AllocatorCache *cache); class HwasanChunkView { public: diff --git a/compiler-rt/lib/hwasan/hwasan_thread.cpp b/compiler-rt/lib/hwasan/hwasan_thread.cpp index 5faa899541854..b8a9d288e1349 100644 --- a/compiler-rt/lib/hwasan/hwasan_thread.cpp +++ b/compiler-rt/lib/hwasan/hwasan_thread.cpp @@ -100,7 +100,7 @@ void Thread::ClearShadowForThreadStackAndTLS() { void Thread::Destroy() { if (flags()->verbose_threads) Print("Destroying: "); - AllocatorSwallowThreadLocalCache(allocator_cache()); + AllocatorThreadFinish(allocator_cache()); ClearShadowForThreadStackAndTLS(); if (heap_allocations_) heap_allocations_->Delete();