[compiler-rt] fa58f32 - [NFC][HWASAN] Rename AllocatorSwallowThreadLocalCache

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 13:28:12 PDT 2023


Author: Vitaly Buka
Date: 2023-05-24T13:27:47-07:00
New Revision: fa58f32754d249440850ad41b74072865256fa74

URL: https://github.com/llvm/llvm-project/commit/fa58f32754d249440850ad41b74072865256fa74
DIFF: https://github.com/llvm/llvm-project/commit/fa58f32754d249440850ad41b74072865256fa74.diff

LOG: [NFC][HWASAN] Rename AllocatorSwallowThreadLocalCache

Added: 
    

Modified: 
    compiler-rt/lib/hwasan/hwasan_allocator.cpp
    compiler-rt/lib/hwasan/hwasan_allocator.h
    compiler-rt/lib/hwasan/hwasan_thread.cpp

Removed: 
    


################################################################################
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<AP64> PrimaryAllocator;
 typedef CombinedAllocator<PrimaryAllocator> 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();


        


More information about the llvm-commits mailing list