[libcxx] Fix setup of MSVC specific intrinsics in Ryu code
This fixes warnings about implicitly declared `_umul128` and `__shiftright128` when building for x86_64 with clang-cl. Use `_MSC_VER` instead of `_LIBCPP_COMPILER_MSVC` for enabling MSVC specific code; `_MSC_VER` is defined both in clang-cl and MSVC, while `_LIBCPP_COMPILER_MSVC` only is defined if building with the actual MSVC compiler. Include `ryu.h` at the head of `d2s_intrinsics.h`, as it uses the `_LIBCPP_64_BIT` define, which is defined in `ryu.h`. Now the Ryu files build without warnings with clang-cl for i386, x86_64, arm and aarch64. Differential Revision: https://reviews.llvm.org/D119647
Loading
Please sign in to comment