1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // <atomic>
10 
11 // Test that including <atomic> fails to compile when _LIBCPP_HAS_NO_THREADS
12 // is defined.
13 
14 // MODULES_DEFINES: _LIBCPP_HAS_NO_THREADS
15 #ifndef _LIBCPP_HAS_NO_THREADS
16 #define _LIBCPP_HAS_NO_THREADS
17 #endif
18 
19 #include <atomic>
20 
main(int,char **)21 int main(int, char**)
22 {
23 
24   return 0;
25 }
26