Skip to content
Commit 7b89360d authored by Martin Storsjö's avatar Martin Storsjö
Browse files

[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
parent 1234011b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment