[libcxx-commits] [PATCH] D108630: [libc++] Remove _LIBCPP_HAS_NO_LONG_LONG in favour of using_if_exists

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 24 07:35:59 PDT 2021


ldionne added inline comments.


================
Comment at: libcxx/include/stdlib.h:153
 }
-#ifndef _LIBCPP_HAS_NO_LONG_LONG
+#if !(defined(__FreeBSD__) && !defined(__LONG_LONG_SUPPORTED))
 inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,
----------------
@emaste @dim

What does `!defined(__LONG_LONG_SUPPORTED)` mean exactly? It doesn't mean that the `long long` type isn't provided by the compiler, because there are several other uses of `long long` in the library that are not guarded by that check. Is it only about the C Standard Library on FreeBSD not providing `::lldiv`? What about `__builtin_llabs()` -- I would that if `long long` is a valid type, the compiler does implement `__builtin_llabs` as used above and we don't need to guard the above use of it?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108630/new/

https://reviews.llvm.org/D108630



More information about the libcxx-commits mailing list