summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-02-06 05:26:49 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-02-06 05:26:49 +0000
commitcda122b35320c8e49a35f4f5e44c7da7023e4402 (patch)
tree7c4741d59ba456579ad7473aa7e80e6857736bf1 /src
parenta67aa062c6198af789f866cc0ac66091f6eb114a (diff)
Refer to _LIBCPP_MSVC macro where applicable
Replace preprocess conditions of defined(_MSC_VER) && !defined(__clang__) with defined(_LIBCPP_MSVC). NFC. Patch by Dave Lee! git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src')
-rw-r--r--src/exception.cpp12
-rw-r--r--src/include/atomic_support.h2
-rw-r--r--src/thread.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/exception.cpp b/src/exception.cpp
index f25041d83..35a3a9aba 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -138,7 +138,7 @@ int uncaught_exceptions() _NOEXCEPT
#elif defined(_LIBCPP_ABI_MICROSOFT)
return __uncaught_exceptions();
#else
-# if defined(_MSC_VER) && ! defined(__clang__)
+# if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("uncaught_exceptions not yet implemented")
# else
# warning uncaught_exception not yet implemented
@@ -211,7 +211,7 @@ exception_ptr::~exception_ptr() _NOEXCEPT
#elif defined(__GLIBCXX__)
reinterpret_cast<__exception_ptr::exception_ptr*>(this)->~exception_ptr();
#else
-# if defined(_MSC_VER) && ! defined(__clang__)
+# if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("exception_ptr not yet implemented")
# else
# warning exception_ptr not yet implemented
@@ -230,7 +230,7 @@ exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
new (reinterpret_cast<void*>(this)) __exception_ptr::exception_ptr(
reinterpret_cast<const __exception_ptr::exception_ptr&>(other));
#else
-# if defined(_MSC_VER) && ! defined(__clang__)
+# if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("exception_ptr not yet implemented")
# else
# warning exception_ptr not yet implemented
@@ -255,7 +255,7 @@ exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
reinterpret_cast<const __exception_ptr::exception_ptr&>(other);
return *this;
#else
-# if defined(_MSC_VER) && ! defined(__clang__)
+# if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("exception_ptr not yet implemented")
# else
# warning exception_ptr not yet implemented
@@ -299,7 +299,7 @@ exception_ptr current_exception() _NOEXCEPT
ptr.__ptr_ = __cxa_current_primary_exception();
return ptr;
#else
-# if defined(_MSC_VER) && ! defined(__clang__)
+# if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING( "exception_ptr not yet implemented" )
# else
# warning exception_ptr not yet implemented
@@ -321,7 +321,7 @@ void rethrow_exception(exception_ptr p)
#elif defined(__GLIBCXX__)
rethrow_exception(reinterpret_cast<__exception_ptr::exception_ptr&>(p));
#else
-# if defined(_MSC_VER) && ! defined(__clang__)
+# if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("exception_ptr not yet implemented")
# else
# warning exception_ptr not yet implemented
diff --git a/src/include/atomic_support.h b/src/include/atomic_support.h
index af0f5f505..378541b23 100644
--- a/src/include/atomic_support.h
+++ b/src/include/atomic_support.h
@@ -29,7 +29,7 @@
#endif
#if !defined(_LIBCPP_HAS_ATOMIC_BUILTINS) && !defined(_LIBCPP_HAS_NO_THREADS)
-# if defined(_MSC_VER) && !defined(__clang__)
+# if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("Building libc++ without __atomic builtins is unsupported")
# else
# warning Building libc++ without __atomic builtins is unsupported
diff --git a/src/thread.cpp b/src/thread.cpp
index c471b5c02..afa8e163b 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -99,7 +99,7 @@ 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.
-# if defined(_MSC_VER) && ! defined(__clang__)
+# if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("hardware_concurrency not yet implemented")
# else
# warning hardware_concurrency not yet implemented