diff options
author | Dan Albert <danalbert@google.com> | 2014-12-18 00:03:57 +0000 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-12-18 00:03:57 +0000 |
commit | 12c0c8b67fdcb11352bac93dde9c76ce47f32744 (patch) | |
tree | a1e999e44114569bbadce62a8295a4a1e579c613 /libcxxabi/include/cxxabi.h | |
parent | 8e015ff43bd844480fb33eb1ff0aec9826361f1a (diff) | |
download | bcm5719-llvm-12c0c8b67fdcb11352bac93dde9c76ce47f32744.tar.gz bcm5719-llvm-12c0c8b67fdcb11352bac93dde9c76ce47f32744.zip |
[libcxxabi] Add __cxa_thread_atexit for TLS support on Linux.
Summary:
Fixes PR21738.
The implementation for this is handled by __cxa_thread_atexit_impl,
which is supplied by libc.
More information:
https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables
Reviewers: mclow.lists, EricWF, jroelofs
Reviewed By: jroelofs
Subscribers: majnemer, cfe-commits
Differential Revision: http://reviews.llvm.org/D6708
llvm-svn: 224477
Diffstat (limited to 'libcxxabi/include/cxxabi.h')
-rw-r--r-- | libcxxabi/include/cxxabi.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxxabi/include/cxxabi.h b/libcxxabi/include/cxxabi.h index 46d673008b7..e5c9b66688f 100644 --- a/libcxxabi/include/cxxabi.h +++ b/libcxxabi/include/cxxabi.h @@ -178,6 +178,12 @@ extern void __cxa_decrement_exception_refcount(void* primary_exception) throw(); // Apple addition to support std::uncaught_exception() extern bool __cxa_uncaught_exception() throw(); +#ifdef __linux__ +// Linux TLS support. Not yet an official part of the Itanium ABI. +// https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables +extern int __cxa_thread_atexit(void (*)(void *), void *, void *) throw(); +#endif + } // extern "C" } // namespace __cxxabiv1 |