[libcxx-commits] [libcxx] [libcxx] Add __assertion_handler as forwarding header (PR #134351)

Takuto Ikuta via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 4 00:33:37 PDT 2025


https://github.com/atetubou updated https://github.com/llvm/llvm-project/pull/134351

>From 65271f03228bf57fbe9d3ca6f0373538cb674eed Mon Sep 17 00:00:00 2001
From: Takuto Ikuta <tikuta at google.com>
Date: Fri, 4 Apr 2025 15:32:40 +0900
Subject: [PATCH 1/2] libcxx: Add __assertion_handler as forwarding header

---
 libcxx/include/__assertion_handler | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 libcxx/include/__assertion_handler

diff --git a/libcxx/include/__assertion_handler b/libcxx/include/__assertion_handler
new file mode 100644
index 0000000000000..b5eb532859476
--- /dev/null
+++ b/libcxx/include/__assertion_handler
@@ -0,0 +1,15 @@
+// -*- 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___ASSERTION_HANDLER
+#define _LIBCPP___ASSERTION_HANDLER
+
+#include_next <__assertion_handler> // Note: this include is generated by CMake and is potentially vendor-provided.
+
+#endif // _LIBCPP___ASSERTION_HANDLER

>From 49203dbcfaf39dba727093a62f2452e72849aa7e Mon Sep 17 00:00:00 2001
From: Takuto Ikuta <tikuta at google.com>
Date: Fri, 4 Apr 2025 16:33:20 +0900
Subject: [PATCH 2/2] pragma

---
 libcxx/include/__assertion_handler | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libcxx/include/__assertion_handler b/libcxx/include/__assertion_handler
index b5eb532859476..6307c6bf88594 100644
--- a/libcxx/include/__assertion_handler
+++ b/libcxx/include/__assertion_handler
@@ -12,4 +12,8 @@
 
 #include_next <__assertion_handler> // Note: this include is generated by CMake and is potentially vendor-provided.
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#  pragma GCC system_header
+#endif
+
 #endif // _LIBCPP___ASSERTION_HANDLER



More information about the libcxx-commits mailing list