diff options
| author | JF Bastien <jfbastien@apple.com> | 2019-01-09 23:20:24 +0000 |
|---|---|---|
| committer | JF Bastien <jfbastien@apple.com> | 2019-01-09 23:20:24 +0000 |
| commit | 1026ce6de4b3773a011dc9c4dab18d2b0c00feca (patch) | |
| tree | 02aac55754987541e30191b5e78e640fbd3579fb /libcxx | |
| parent | 569f0909222e9156c2b1c91e4b135efe2c87f9e3 (diff) | |
| download | bcm5719-llvm-1026ce6de4b3773a011dc9c4dab18d2b0c00feca.tar.gz bcm5719-llvm-1026ce6de4b3773a011dc9c4dab18d2b0c00feca.zip | |
[NFC] Always lock free test: add indirection
I have a big patch coming up, and this indirection is required to avoid hitting the following after my big change:
error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat]
llvm-svn: 350772
Diffstat (limited to 'libcxx')
| -rw-r--r-- | libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp index 7a8d4c1f4a6..43436e65a90 100644 --- a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp +++ b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp @@ -59,7 +59,7 @@ void checkLongLongTypes() { static_assert((0 != ATOMIC_LLONG_LOCK_FREE) == ExpectLockFree, ""); } -int main() +void run() { // structs and unions can't be defined in the template invocation. // Work around this with a typedef. @@ -134,3 +134,5 @@ int main() static_assert(std::atomic<void*>::is_always_lock_free == (2 == ATOMIC_POINTER_LOCK_FREE)); static_assert(std::atomic<std::nullptr_t>::is_always_lock_free == (2 == ATOMIC_POINTER_LOCK_FREE)); } + +int main() { run(); } |

