macro.pass.cpp 692 B

12345678910111213141516171819202122232425262728
  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. // UNSUPPORTED: libcpp-has-no-threads
  10. // <thread>
  11. // #define __STDCPP_THREADS__ 1
  12. #include <thread>
  13. #include "test_macros.h"
  14. int main(int, char**)
  15. {
  16. #ifndef __STDCPP_THREADS__
  17. #error __STDCPP_THREADS__ is not defined
  18. #elif __STDCPP_THREADS__ != 1
  19. #error __STDCPP_THREADS__ has the wrong value
  20. #endif
  21. return 0;
  22. }