mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Upgrade to 2022-era LLVM LIBCXX
This commit is contained in:
parent
2f4ca71f26
commit
8e68384e15
2078 changed files with 165657 additions and 65010 deletions
56
third_party/libcxx/limits
vendored
56
third_party/libcxx/limits
vendored
|
@ -1,5 +1,5 @@
|
|||
// -*- C++ -*-
|
||||
//===---------------------------- limits ----------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
|
@ -10,19 +10,6 @@
|
|||
#ifndef _LIBCPP_LIMITS
|
||||
#define _LIBCPP_LIMITS
|
||||
|
||||
#include "third_party/libcxx/__config"
|
||||
#include "third_party/libcxx/type_traits"
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_PUSH_MACROS
|
||||
#include "third_party/libcxx/__undef_macros"
|
||||
#include "third_party/libcxx/version"
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
/*
|
||||
limits synopsis
|
||||
|
||||
|
@ -115,6 +102,23 @@ template<> class numeric_limits<cv long double>;
|
|||
|
||||
*/
|
||||
|
||||
#include <__assert> // all public C++ headers provide the assertion handler
|
||||
#include <__config>
|
||||
#include <__type_traits/is_arithmetic.h>
|
||||
#include <__type_traits/is_signed.h>
|
||||
#include <__type_traits/remove_cv.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_PUSH_MACROS
|
||||
#include <__undef_macros>
|
||||
#include <version>
|
||||
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
enum float_round_style
|
||||
{
|
||||
round_indeterminate = -1,
|
||||
|
@ -331,7 +335,11 @@ protected:
|
|||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
#if (defined(__arm__) || defined(__aarch64__))
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
|
||||
#else
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
#endif
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
||||
};
|
||||
|
||||
|
@ -377,7 +385,11 @@ protected:
|
|||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
#if (defined(__arm__) || defined(__aarch64__))
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
|
||||
#else
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
#endif
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
||||
};
|
||||
|
||||
|
@ -418,7 +430,7 @@ protected:
|
|||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
|
||||
|
||||
#if (defined(__ppc__) || defined(__ppc64__))
|
||||
#if defined(__powerpc__) && defined(__LONG_DOUBLE_IBM128__)
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
||||
#else
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
|
||||
|
@ -427,15 +439,19 @@ protected:
|
|||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
#if (defined(__arm__) || defined(__aarch64__))
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
|
||||
#else
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
#endif
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
class _LIBCPP_TEMPLATE_VIS numeric_limits
|
||||
: private __libcpp_numeric_limits<typename remove_cv<_Tp>::type>
|
||||
: private __libcpp_numeric_limits<__remove_cv_t<_Tp> >
|
||||
{
|
||||
typedef __libcpp_numeric_limits<typename remove_cv<_Tp>::type> __base;
|
||||
typedef __libcpp_numeric_limits<__remove_cv_t<_Tp> > __base;
|
||||
typedef typename __base::type type;
|
||||
public:
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
||||
|
@ -807,4 +823,8 @@ _LIBCPP_END_NAMESPACE_STD
|
|||
|
||||
_LIBCPP_POP_MACROS
|
||||
|
||||
#endif // _LIBCPP_LIMITS
|
||||
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
|
||||
# include <type_traits>
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_LIMITS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue