[libcxx-commits] [libcxxabi] [libc++abi] Use __has_feature check to enable usage of thread_local for exception storage (PR #97591)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 3 08:34:38 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxxabi
Author: Louis Dionne (ldionne)
<details>
<summary>Changes</summary>
Previously, we'd use HAS_THREAD_LOCAL which was never defined. Hence, we'd basically never use the code path where we use thread_local.
Fixes #<!-- -->78207
---
Full diff: https://github.com/llvm/llvm-project/pull/97591.diff
1 Files Affected:
- (modified) libcxxabi/src/cxa_exception_storage.cpp (+1-1)
``````````diff
diff --git a/libcxxabi/src/cxa_exception_storage.cpp b/libcxxabi/src/cxa_exception_storage.cpp
index 2479f550e09ef..c842da195accb 100644
--- a/libcxxabi/src/cxa_exception_storage.cpp
+++ b/libcxxabi/src/cxa_exception_storage.cpp
@@ -24,7 +24,7 @@ extern "C" {
} // extern "C"
} // namespace __cxxabiv1
-#elif defined(HAS_THREAD_LOCAL)
+#elif __has_feature(cxx_thread_local)
namespace __cxxabiv1 {
namespace {
``````````
</details>
https://github.com/llvm/llvm-project/pull/97591
More information about the libcxx-commits
mailing list