[all-commits] [llvm/llvm-project] 7b8936: [libcxx] Fix setup of MSVC specific intrinsics in ...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Mon Feb 14 12:11:37 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7b89360d3a14705ebe41b1a5c5da65791d523d4f
      https://github.com/llvm/llvm-project/commit/7b89360d3a14705ebe41b1a5c5da65791d523d4f
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-02-14 (Mon, 14 Feb 2022)

  Changed paths:
    M libcxx/src/include/ryu/d2s_intrinsics.h
    M libcxx/src/include/ryu/ryu.h

  Log Message:
  -----------
  [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




More information about the All-commits mailing list