diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-04-05 01:46:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-05 01:46:13 -0400 |
| commit | 0cd31fc7ff157551cfbba5da35cd79f118d2a2e3 (patch) | |
| tree | a308488f5d85184c8ec402fb3f55f1cf2704443e /lib/libcxx/include/source_location | |
| parent | 8acedfd5baabab705946ad097746f9183ef62420 (diff) | |
| parent | cefe65c1b8abe65a22d4b68410db1be264fdeda0 (diff) | |
| download | zig-0cd31fc7ff157551cfbba5da35cd79f118d2a2e3.tar.gz zig-0cd31fc7ff157551cfbba5da35cd79f118d2a2e3.zip | |
Merge pull request #22780 from ziglang/llvm20
LLVM 20
Diffstat (limited to 'lib/libcxx/include/source_location')
| -rw-r--r-- | lib/libcxx/include/source_location | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/libcxx/include/source_location b/lib/libcxx/include/source_location index d16e3c46fc..b4777ce5a1 100644 --- a/lib/libcxx/include/source_location +++ b/lib/libcxx/include/source_location @@ -25,17 +25,20 @@ namespace std { } */ -#include <__config> -#include <cstdint> -#include <version> +#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) +# include <__cxx03/source_location> +#else +# include <__config> +# include <cstdint> +# include <version> -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif +# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +# endif _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER >= 20 +# if _LIBCPP_STD_VER >= 20 class source_location { // The names source_location::__impl, _M_file_name, _M_function_name, _M_line, and _M_column @@ -52,7 +55,7 @@ class source_location { // in constant evaluation, so we don't want to use `void*` as the argument // type unless the builtin returned that, anyhow, and the invalid cast is // unavoidable. - using __bsl_ty = decltype(__builtin_source_location()); + using __bsl_ty _LIBCPP_NODEBUG = decltype(__builtin_source_location()); public: // The defaulted __ptr argument is necessary so that the builtin is evaluated @@ -78,8 +81,10 @@ public: } }; -#endif // _LIBCPP_STD_VER >= 20 +# endif // _LIBCPP_STD_VER >= 20 _LIBCPP_END_NAMESPACE_STD +#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) + #endif // _LIBCPP_SOURCE_LOCATION |
