mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-11 17:08:42 +00:00
[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
This commit is contained in:
parent
569f090922
commit
1026ce6de4
@ -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(); }
|
||||
|
Loading…
Reference in New Issue
Block a user