diff --git a/compiler-rt/lib/scudo/standalone/internal_defs.h b/compiler-rt/lib/scudo/standalone/internal_defs.h --- a/compiler-rt/lib/scudo/standalone/internal_defs.h +++ b/compiler-rt/lib/scudo/standalone/internal_defs.h @@ -36,7 +36,6 @@ #define FORMAT(F, A) __attribute__((format(printf, F, A))) #define NOINLINE __attribute__((noinline)) #define NORETURN __attribute__((noreturn)) -#define THREADLOCAL __thread #define LIKELY(X) __builtin_expect(!!(X), 1) #define UNLIKELY(X) __builtin_expect(!!(X), 0) #if defined(__i386__) || defined(__x86_64__) diff --git a/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp b/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp --- a/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp +++ b/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp @@ -152,7 +152,7 @@ static bool Ready; template static void performAllocations(Primary *Allocator) { - static THREADLOCAL typename Primary::CacheT Cache; + static thread_local typename Primary::CacheT Cache; Cache.init(nullptr, Allocator); std::vector> V; { diff --git a/compiler-rt/lib/scudo/standalone/tsd_exclusive.h b/compiler-rt/lib/scudo/standalone/tsd_exclusive.h --- a/compiler-rt/lib/scudo/standalone/tsd_exclusive.h +++ b/compiler-rt/lib/scudo/standalone/tsd_exclusive.h @@ -99,16 +99,16 @@ atomic_u8 Disabled; TSD FallbackTSD; HybridMutex Mutex; - static THREADLOCAL ThreadState State; - static THREADLOCAL TSD ThreadTSD; + static thread_local ThreadState State; + static thread_local TSD ThreadTSD; friend void teardownThread(void *Ptr); }; template -THREADLOCAL TSD TSDRegistryExT::ThreadTSD; +thread_local TSD TSDRegistryExT::ThreadTSD; template -THREADLOCAL ThreadState TSDRegistryExT::State; +thread_local ThreadState TSDRegistryExT::State; template void teardownThread(void *Ptr) { typedef TSDRegistryExT TSDRegistryT;