Skip to content

Conversation

@dybv-sc
Copy link
Contributor

@dybv-sc dybv-sc commented Mar 20, 2025

This is a backport of original commit #97591 to 18.x release.

…or exception storage (llvm#97591)

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 llvm#78207
@dybv-sc dybv-sc requested a review from a team as a code owner March 20, 2025 15:45
@llvmbot llvmbot added the libc++abi libc++abi C++ Runtime Library. Not libc++. label Mar 20, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 20, 2025

@llvm/pr-subscribers-libcxxabi

Author: Bushev Dmitry (dybv-sc)

Changes

This is a backport of original commit #97591 to 18.x release.


Full diff: https://github.com/llvm/llvm-project/pull/132241.diff

1 Files Affected:

  • (modified) libcxxabi/src/cxa_exception_storage.cpp (+1-1)
diff --git a/libcxxabi/src/cxa_exception_storage.cpp b/libcxxabi/src/cxa_exception_storage.cpp
index 3a3233a1b9272..83408c904e1f7 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 {

@ldionne
Copy link
Member

ldionne commented Mar 20, 2025

The LLVM 18 release has been done for a long time, we're working on LLVM 20 now.

@ldionne
Copy link
Member

ldionne commented Mar 20, 2025

(I'm going to tentatively close this since as I said we're not cherry-picking stuff back to LLVM 18 anymore, please reopen for more discussion)

@ldionne ldionne closed this Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++abi libc++abi C++ Runtime Library. Not libc++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants