Differential Revision: https://reviews.llvm.org/D128514
/// running in multithreaded mode.
template <bool mt_only> class SmartRWMutex {
// shared_mutex (C++17) is more efficient than shared_timed_mutex (C++14)
- // on Windows and always available on MSVC.
-#if defined(_MSC_VER) || __cplusplus > 201402L
+ // on Windows and always available on MSVC except with libc++.
+#if (defined(_MSC_VER) && !defined(_LIBCPP_VERSION)) || __cplusplus > 201402L
std::shared_mutex impl;
#else
#if !defined(LLVM_USE_RW_MUTEX_IMPL)
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include <float.h> // For _fpclass in llvm::write_double.
+#endif
+
using namespace llvm;
template<typename T, std::size_t N>
#include <immintrin.h>
#include <intrin.h>
#endif
+#if defined(__x86_64__) && defined(_MSC_VER)
+#include <float.h> // For _clearfp in ~X86SavedState().
+#endif
namespace llvm {
namespace exegesis {