[llvm-branch-commits] [libc] [libc][annex_k] Add libc_constraint_handler. (PR #163315)
Muhammad Bassiouni via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Oct 18 06:38:56 PDT 2025
https://github.com/bassiounix updated https://github.com/llvm/llvm-project/pull/163315
>From e9e697ec11cadc3bd17b2eb1cb12121a7ea6ba37 Mon Sep 17 00:00:00 2001
From: bassiounix <muhammad.m.bassiouni at gmail.com>
Date: Tue, 14 Oct 2025 06:38:29 +0300
Subject: [PATCH 1/2] [libc][annex_k] Add libc_constraint_handler.
---
libc/src/__support/annex_k/CMakeLists.txt | 9 +++++++
.../annex_k/libc_constraint_handler.h | 26 +++++++++++++++++++
2 files changed, 35 insertions(+)
create mode 100644 libc/src/__support/annex_k/libc_constraint_handler.h
diff --git a/libc/src/__support/annex_k/CMakeLists.txt b/libc/src/__support/annex_k/CMakeLists.txt
index 78f5b3cddebd7..8eb65f2469b4f 100644
--- a/libc/src/__support/annex_k/CMakeLists.txt
+++ b/libc/src/__support/annex_k/CMakeLists.txt
@@ -10,3 +10,12 @@ add_header_library(
libc.src.__support.OSUtil.osutil
libc.src.stdlib.abort
)
+
+add_header_library(
+ libc_constraint_handler
+ HDRS
+ libc_constraint_handler.h
+ DEPENDS
+ .abort_handler_s
+ libc.hdr.types.constraint_handler_t
+)
diff --git a/libc/src/__support/annex_k/libc_constraint_handler.h b/libc/src/__support/annex_k/libc_constraint_handler.h
new file mode 100644
index 0000000000000..db01c8dd940a0
--- /dev/null
+++ b/libc/src/__support/annex_k/libc_constraint_handler.h
@@ -0,0 +1,26 @@
+//===-- Static header for libc_constraint_handler ---------------*- 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 LLVM_LIBC_SRC___SUPPORT_ANNEX_K_LIBC_CONSTRAINT_HANDLER_H
+#define LLVM_LIBC_SRC___SUPPORT_ANNEX_K_LIBC_CONSTRAINT_HANDLER_H
+
+#include "abort_handler_s.h"
+#include "hdr/types/constraint_handler_t.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+namespace annex_k {
+
+LIBC_INLINE static constraint_handler_t libc_constraint_handler =
+ &abort_handler_s;
+
+} // namespace annex_k
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_ANNEX_K_LIBC_CONSTRAINT_HANDLER_H
>From 20f34564bf3ae1596a242f7a586ae6e53c7f8811 Mon Sep 17 00:00:00 2001
From: bassiounix <muhammad.m.bassiouni at gmail.com>
Date: Fri, 17 Oct 2025 16:27:21 +0300
Subject: [PATCH 2/2] fix format
---
libc/src/__support/annex_k/libc_constraint_handler.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/src/__support/annex_k/libc_constraint_handler.h b/libc/src/__support/annex_k/libc_constraint_handler.h
index db01c8dd940a0..9b0a45d09cb32 100644
--- a/libc/src/__support/annex_k/libc_constraint_handler.h
+++ b/libc/src/__support/annex_k/libc_constraint_handler.h
@@ -23,4 +23,4 @@ LIBC_INLINE static constraint_handler_t libc_constraint_handler =
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC___SUPPORT_ANNEX_K_LIBC_CONSTRAINT_HANDLER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_ANNEX_K_LIBC_CONSTRAINT_HANDLER_H
More information about the llvm-branch-commits
mailing list