summaryrefslogtreecommitdiffstats
path: root/libcxx/src/thread.cpp
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2013-10-04 21:14:44 +0000
committerHoward Hinnant <hhinnant@apple.com>2013-10-04 21:14:44 +0000
commit80b84d4c268b75994524b00db7a1437b070e98a8 (patch)
tree290334ccf2bb11bd0ef986802bc4e342269ecebc /libcxx/src/thread.cpp
parent217308086de51b02dc7e27f5aa04e13c30072b34 (diff)
downloadbcm5719-llvm-80b84d4c268b75994524b00db7a1437b070e98a8.tar.gz
bcm5719-llvm-80b84d4c268b75994524b00db7a1437b070e98a8.zip
G M: Provides the _LIBCPP_WARNING macro, to be used for MSVC only, since that compiler doesn't support #warning.
llvm-svn: 191980
Diffstat (limited to 'libcxx/src/thread.cpp')
-rw-r--r--libcxx/src/thread.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libcxx/src/thread.cpp b/libcxx/src/thread.cpp
index cdfa2fd9273..338a8a24cef 100644
--- a/libcxx/src/thread.cpp
+++ b/libcxx/src/thread.cpp
@@ -89,7 +89,11 @@ thread::hardware_concurrency() _NOEXCEPT
#else // defined(CTL_HW) && defined(HW_NCPU)
// TODO: grovel through /proc or check cpuid on x86 and similar
// instructions on other architectures.
-#warning hardware_concurrency not yet implemented
+# if defined(_MSC_VER) && ! defined(__clang__)
+ _LIBCPP_WARNING("hardware_concurrency not yet implemented")
+# else
+# warning hardware_concurrency not yet implemented
+# endif
return 0; // Means not computable [thread.thread.static]
#endif // defined(CTL_HW) && defined(HW_NCPU)
}
OpenPOWER on IntegriCloud