diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2019-07-30 14:32:47 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2019-07-30 14:32:47 +0000 |
| commit | 9aae539d4cfbf68a367360617cefc5a2c0389b6a (patch) | |
| tree | 9cc90d4ccdd336b7a7bd0171abbe06786128b3ad /libcxx/test/std/thread | |
| parent | 9ad716ed3998eb41033a59e60127669cd169b049 (diff) | |
| download | bcm5719-llvm-9aae539d4cfbf68a367360617cefc5a2c0389b6a.tar.gz bcm5719-llvm-9aae539d4cfbf68a367360617cefc5a2c0389b6a.zip | |
libcxx: Define __STDCPP_THREADS__ to 1, not to __cplusplus.
[cpp.predefined]p2:
__STDCPP_THREADS__
Defined, and has the value integer literal 1, if and only if a program
can have more than one thread of execution .
Also define it only if it's not defined already, since it's supposed
to be defined by the compiler.
Also move it from thread to __config (which requires setting it only
if _LIBCPP_HAS_NO_THREADS is not defined).
Part of PR33230. The intent is to eventually make the compiler define
this instead.
llvm-svn: 367316
Diffstat (limited to 'libcxx/test/std/thread')
| -rw-r--r-- | libcxx/test/std/thread/macro.pass.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/test/std/thread/macro.pass.cpp b/libcxx/test/std/thread/macro.pass.cpp index 0c16a0d0516..5d24d5f36a3 100644 --- a/libcxx/test/std/thread/macro.pass.cpp +++ b/libcxx/test/std/thread/macro.pass.cpp @@ -10,7 +10,7 @@ // <thread> -// #define __STDCPP_THREADS__ __cplusplus +// #define __STDCPP_THREADS__ 1 #include <thread> @@ -20,6 +20,8 @@ int main(int, char**) { #ifndef __STDCPP_THREADS__ #error __STDCPP_THREADS__ is not defined +#elif __STDCPP_THREADS__ != 1 +#error __STDCPP_THREADS__ has the wrong value #endif return 0; |

