@@ -29,10 +29,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
29
29
template <__signed_or_unsigned_integer _Tp, __signed_or_unsigned_integer _Up>
30
30
_LIBCPP_HIDE_FROM_ABI constexpr bool cmp_equal (_Tp __t , _Up __u) noexcept {
31
31
if constexpr (sizeof (_Tp) < sizeof (int ) && sizeof (_Up) < sizeof (int )) {
32
- __builtin_assume (__t < numeric_limits<int >::max () && __u < numeric_limits<int >::max ());
32
+ _LIBCPP_ASSUME (__t < numeric_limits<int >::max () && __u < numeric_limits<int >::max ());
33
33
return static_cast <int >(__t ) == static_cast <int >(__u);
34
34
} else if constexpr (sizeof (_Tp) < sizeof (long long ) && sizeof (_Up) < sizeof (long long )) {
35
- __builtin_assume (__t < numeric_limits<long long >::max () && __u < numeric_limits<long long >::max ());
35
+ _LIBCPP_ASSUME (__t < numeric_limits<long long >::max () && __u < numeric_limits<long long >::max ());
36
36
return static_cast <long long >(__t ) == static_cast <long long >(__u);
37
37
} else if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>)
38
38
return __t == __u;
@@ -50,10 +50,10 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool cmp_not_equal(_Tp __t, _Up __u) noexcept {
50
50
template <__signed_or_unsigned_integer _Tp, __signed_or_unsigned_integer _Up>
51
51
_LIBCPP_HIDE_FROM_ABI constexpr bool cmp_less (_Tp __t , _Up __u) noexcept {
52
52
if constexpr (sizeof (_Tp) < sizeof (int ) && sizeof (_Up) < sizeof (int )) {
53
- __builtin_assume (__t < numeric_limits<int >::max () && __u < numeric_limits<int >::max ());
53
+ _LIBCPP_ASSUME (__t < numeric_limits<int >::max () && __u < numeric_limits<int >::max ());
54
54
return static_cast <int >(__t ) < static_cast <int >(__u);
55
55
} else if constexpr (sizeof (_Tp) < sizeof (long long ) && sizeof (_Up) < sizeof (long long )) {
56
- __builtin_assume (__t < numeric_limits<long long >::max () && __u < numeric_limits<long long >::max ());
56
+ _LIBCPP_ASSUME (__t < numeric_limits<long long >::max () && __u < numeric_limits<long long >::max ());
57
57
return static_cast <long long >(__t ) < static_cast <long long >(__u);
58
58
} else if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>)
59
59
return __t < __u;
0 commit comments