[libc] Support constexpr uint initialization
authorMichael Jones <michaelrj@google.com>
Wed, 19 Apr 2023 23:51:33 +0000 (16:51 -0700)
committerMichael Jones <michaelrj@google.com>
Thu, 20 Apr 2023 20:09:15 +0000 (13:09 -0700)
commit86fe88c8d91bb30870007c48ca71672fda8d6492
tree4efa575549844a4e00b172f33ee878366435361e
parentf85369467cff35c9b12692f73b74fd109d3087b9
[libc] Support constexpr uint initialization

Uint addition and subtraction normally use builtins which aren't
constexpr. This patch adds an rvalue overload version of the addition
and subtraction operation that is always constexpr.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D148759
libc/src/__support/FPUtil/FloatProperties.h
libc/src/__support/FPUtil/NearestIntegerOperations.h
libc/src/__support/FPUtil/x86_64/LongDoubleBits.h
libc/src/__support/UInt.h
libc/src/__support/builtin_wrappers.h
libc/test/src/__support/uint_test.cpp