summaryrefslogtreecommitdiff
path: root/libcxxabi/test/guard_test_basic.pass.cpp
AgeCommit message (Collapse)Author
2022-12-22[libc++] Granularize <type_traits> includes in <utility>Nikolas Klauser
Reviewed By: Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D140426
2022-05-26[libc++abi] Use from-scratch testing configs for libc++abi by defaultLouis Dionne
Like we have been doing for libc++ for a while now, start using from-scratch testing configurations for libc++abi. As a fly-by fix, remove the LIBCXXABI_NO_TIMER macro, which was defined but never used. Differential Revision: https://reviews.llvm.org/D125242
2022-01-12[libcxxabi] Added convenience classes to cxa_guardDaniel McIntosh
This is the 5th of 5 changes to overhaul cxa_guard. See D108343 for what the final result will be. Depends on D115368 Reviewed By: ldionne, #libc_abi Differential Revision: https://reviews.llvm.org/D115369
2022-01-12[libcxxabi] Re-organized inheritance structure to remove CRTP in cxa_guardDaniel McIntosh
Currently, the `InitByte...` classes inherit from `GuardObject` so they can access the `base_address`, `init_byte_address` and `thread_id_address`. Then, since `GuardObject` needs to call `acquire`/`release`/`abort_init_byte`, it uses the curiously recurring template pattern (CRTP). This is rather messy. Instead, we'll have `GuardObject` contain an instance of `InitByte`, and pass it the addresses it needs in the constructor. `GuardObject` doesn't need the addresses anyways, so it makes more sense for `InitByte` to keep them instead of `GuardObject`. Then, `GuardObject` can call `acquire`/`release`/`abort` as one of `InitByte`'s member functions. Organizing things this way not only gets rid of the use of the CRTP, but also improves separation of concerns a bit since the `InitByte` classes are no longer indirectly responsible for things because of their inheritance from `GuardObject`. This means we no longer have strange things like calling `InitByteFutex.cxa_guard_acquire`, instead we call `GuardObject<InitByteFutex>.cxa_guard_acquire`. This is the 4th of 5 changes to overhaul cxa_guard. See D108343 for what the final result will be. Depends on D115367 Reviewed By: ldionne, #libc_abi Differential Revision: https://reviews.llvm.org/D115368
2022-01-12[libcxxabi] Make InitByteGlobalMutex check GetThreadID instead of ↵Daniel McIntosh
PlatformThreadID By relying on PlatformSupportsThreadID, InitByteGlobalMutex disregards the GetThreadID template argument, rendering it useless. This is the 2nd of 5 changes to overhaul cxa_guard. See D108343 for what the final result will be. Depends on D109539 Reviewed By: ldionne, #libc_abi Differential Revision: https://reviews.llvm.org/D110088
2022-01-12[NFC][libcxxabi] Rename GlobalLock to GlobalMutexDaniel McIntosh
This will make the naming more consistent with what it's called in the rest of the file. This is the 1st of 5 changes to overhaul cxa_guard. See D108343 for what the final result will be. Reviewed By: ldionne, #libc_abi Differential Revision: https://reviews.llvm.org/D109539
2020-11-02[libc++abi] Get rid of warnings when running the tests with GCCLouis Dionne
2020-10-08[runtimes] Use int main(int, char**) consistently in testsLouis Dionne
This is needed when running the tests in Freestanding mode, where main() isn't treated specially. In Freestanding, main() doesn't get mangled as extern "C", so whatever runtime we're using fails to find the entry point. One way to solve this problem is to define a symbol alias from __Z4mainiPPc to _main, however this requires all definitions of main() to have the same mangling. Hence this commit.
2020-06-03[libc++] Remove the c++98 Lit feature from the test suiteLouis Dionne
C++98 and C++03 are effectively aliases as far as Clang is concerned. As such, allowing both std=c++98 and std=c++03 as Lit parameters is just slightly confusing, but provides no value. It's similar to allowing both std=c++17 and std=c++1z, which we don't do. This was discovered because we had an internal bot that ran the test suite under both c++98 AND c++03 -- one of which is redundant. Differential Revision: https://reviews.llvm.org/D80926
2020-01-19[libc++][libc++abi] Fix or suppress failing tests in single-threadedEric Fiselier
builds. Fix a libc++abi test that was incorrectly checking for threading primitives even when threading was disabled. Additionally, temporarily XFAIL some module tests that fail because the <atomic> header is unsupported but still built as a part of the std module. To properly address this libc++ would either need to produce a different module.modulemap for single-threaded configurations, or it would need to make the <atomic> header not hard-error and instead be empty for single-threaded configurations
2019-09-26[Testing] unbreak after r372963David Zarzycki
llvm-svn: 372967
2019-04-24Cleanup new cxa guard implementation.Eric Fiselier
* Add TSAN annotations around the futex syscalls. * Test that the futex syscall wrappers actually work. * Fix bad names. llvm-svn: 359069
2019-04-24Work around GCC test failure.Eric Fiselier
llvm-svn: 359065
2019-04-24Rewrite cxa guard implementation.Eric Fiselier
This patch does three main things: (1) It re-writes the cxa guard implementation to make it testable. (2) Adds support for recursive init detection on non-apple platforms. (3) It adds a futex based implementation. The futex based implementation locks and notifies on a per-object basis, unlike the current implementation which uses a global lock for all objects. Once this patch settles I'll turn it on by default when supported. llvm-svn: 359060