================
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// 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___UTILITY_OBSERVABLE_CHECKPOINT_H
+#define _LIBCPP___UTILITY_OBSERVABLE_CHECKPOINT_H
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER >= 26 && __has_builtin(__builtin_observable_checkpoint)
+
+_LIBCPP_HIDE_FROM_ABI inline void observable_checkpoint() noexcept {
__builtin_observable_checkpoint(); }
+
+#endif
+
+_LIBCPP_END_NAMESPACE_STD
----------------
Zingam wrote:
```suggestion
#if _LIBCPP_STD_VER >= 26 && __has_builtin(__builtin_observable_checkpoint)
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_HIDE_FROM_ABI inline void observable_checkpoint() noexcept {
__builtin_observable_checkpoint(); }
_LIBCPP_END_NAMESPACE_STD
#endif
```
I think this may case an empty namespace warning, so you should switch places.
https://github.com/llvm/llvm-project/pull/237335
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits