[libc-commits] [libc] [libc] Remove unused _Thread_local define from headers. (PR #156967)
Alexey Samsonov via libc-commits
libc-commits at lists.llvm.org
Thu Sep 4 13:48:15 PDT 2025
https://github.com/vonosmas created https://github.com/llvm/llvm-project/pull/156967
It was added in dd33f9cdef9f6209aa34713e1417f4a2e24e5ca6 to describe thread-local errno, but is no longer used in the codebase (with the exception of a single integration test, but the llvm-libc-provided `#define _Thread_local thread_local` is not needed there anyway, since `_Thread_local` is a keyword from C11 onwards.
>From 89e02311ab02be8dcdf81636875d5d91cc671d10 Mon Sep 17 00:00:00 2001
From: Alexey Samsonov <vonosmas at gmail.com>
Date: Thu, 4 Sep 2025 13:44:55 -0700
Subject: [PATCH] [libc] Remove unused _Thread_local define from headers.
It was added in dd33f9cdef9f6209aa34713e1417f4a2e24e5ca6 to describe
thread-local errno, but is no longer used in the codebase (with the
exception of a single integration test, but the llvm-libc-provided
`#define _Thread_local thread_local` is not needed there anyway, since
`_Thread_local` is a keyword from C11 onwards.
---
libc/include/__llvm-libc-common.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/libc/include/__llvm-libc-common.h b/libc/include/__llvm-libc-common.h
index 1fe3f4d2aea9c..70d8263e63b65 100644
--- a/libc/include/__llvm-libc-common.h
+++ b/libc/include/__llvm-libc-common.h
@@ -37,9 +37,6 @@
#undef _Alignof
#define _Alignof alignof
-#undef _Thread_local
-#define _Thread_local thread_local
-
#undef __NOEXCEPT
#if __cplusplus >= 201103L
#define __NOEXCEPT noexcept
More information about the libc-commits
mailing list