Commit 8b73be5f authored by Nikolas Klauser's avatar Nikolas Klauser
Browse files

[libc++] Readd _LIBCPP_CONSTINIT

This isn't used by libc++, but it's still used in libc++abi.
parent 1a9fbf61
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ AttributeMacros: [
                  '_LIBCPP_CONSTEXPR_SINCE_CXX20',
                  '_LIBCPP_CONSTEXPR_SINCE_CXX23',
                  '_LIBCPP_CONSTEXPR',
                  '_LIBCPP_CONSTINIT',
                  '_LIBCPP_DEPRECATED_IN_CXX11',
                  '_LIBCPP_DEPRECATED_IN_CXX14',
                  '_LIBCPP_DEPRECATED_IN_CXX17',
+8 −0
Original line number Diff line number Diff line
@@ -1226,6 +1226,14 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
#    define _LIBCPP_THREAD_SAFETY_ANNOTATION(x)
#  endif

#  if _LIBCPP_STD_VER >= 20
#    define _LIBCPP_CONSTINIT constinit
#  elif __has_attribute(__require_constant_initialization__)
#    define _LIBCPP_CONSTINIT __attribute__((__require_constant_initialization__))
#  else
#    define _LIBCPP_CONSTINIT
#  endif

#  if __has_attribute(__diagnose_if__) && !defined(_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS)
#    define _LIBCPP_DIAGNOSE_WARNING(...) __attribute__((__diagnose_if__(__VA_ARGS__, "warning")))
#  else