[libcxx-commits] [libcxx] WIP - [libc++][debugging] P2546R5: Debugging support (PR #81447)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 29 02:19:02 PDT 2024
================
@@ -0,0 +1,44 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_DEBUGGING
+#define _LIBCPP_DEBUGGING
+
+/*
+// all freestanding
+namespace std {
+ // [debugging.utility], utility
+ void breakpoint() noexcept;
+ void breakpoint_if_debugging() noexcept;
+ bool is_debugger_present() noexcept;
+}
+*/
+
+#include <__config>
+#include <version>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER >= 26 && defined(_LIBCPP_HAS_DEBUGGING)
+
+_LIBCPP_EXPORTED_FROM_ABI void breakpoint() noexcept;
----------------
H-G-Hristov wrote:
I guess replacement functions cannot be implemented as header-only, so I need to revert that now.
https://isocpp.org/files/papers/P2810R4.html
https://eel.is/c++draft/replacement.functions#:definition,alternate
https://github.com/llvm/llvm-project/pull/81447
More information about the libcxx-commits
mailing list