[llvm] 5174d00 - [llvm] Add back Allocator.h include to RWMutex.cpp.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 07:01:21 PST 2024


Author: Florian Hahn
Date: 2024-11-20T15:00:11Z
New Revision: 5174d00365b619b5dcd2a451aaf7d844c36ce04d

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

LOG: [llvm] Add back Allocator.h include to RWMutex.cpp.

This unbreaks the build on macOS.

Without the include, the build fails with

llvm/lib/Support/RWMutex.cpp:47:36: error: use of undeclared identifier 'safe_malloc'
   47 |
   static_cast<pthread_rwlock_t*>(safe_malloc(sizeof(pthread_rwlock_t)));
         |                                    ^

Added: 
    

Modified: 
    llvm/lib/Support/RWMutex.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/RWMutex.cpp b/llvm/lib/Support/RWMutex.cpp
index 83adef5bcd97d4..4294c4356f4762 100644
--- a/llvm/lib/Support/RWMutex.cpp
+++ b/llvm/lib/Support/RWMutex.cpp
@@ -13,6 +13,7 @@
 #include "llvm/Support/RWMutex.h"
 #include "llvm/Config/config.h"
 #include "llvm/Config/llvm-config.h" // for LLVM_ENABLE_THREADS
+#include "llvm/Support/Allocator.h"
 
 #if defined(LLVM_USE_RW_MUTEX_IMPL)
 using namespace llvm;


        


More information about the llvm-commits mailing list