Skip to content

Commit f7e9e52

Browse files
committed
[libc][stdlib][annex_k] Add ignore_handler_s.
1 parent b5b13c1 commit f7e9e52

File tree

8 files changed

+64
-0
lines changed

8 files changed

+64
-0
lines changed

libc/config/linux/aarch64/entrypoints.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,7 @@ if(LLVM_LIBC_FULL_BUILD)
10801080
libc.src.stdlib.atexit
10811081
libc.src.stdlib.exit
10821082
libc.src.stdlib.getenv
1083+
libc.src.stdlib.ignore_handler_s
10831084
libc.src.stdlib.quick_exit
10841085

10851086
# signal.h entrypoints

libc/config/linux/riscv/entrypoints.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,7 @@ if(LLVM_LIBC_FULL_BUILD)
12081208
libc.src.stdlib.atexit
12091209
libc.src.stdlib.exit
12101210
libc.src.stdlib.getenv
1211+
libc.src.stdlib.ignore_handler_s
12111212
libc.src.stdlib.quick_exit
12121213

12131214
# signal.h entrypoints

libc/config/linux/x86_64/entrypoints.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,6 +1247,7 @@ if(LLVM_LIBC_FULL_BUILD)
12471247
libc.src.stdlib.atexit
12481248
libc.src.stdlib.exit
12491249
libc.src.stdlib.getenv
1250+
libc.src.stdlib.ignore_handler_s
12501251
libc.src.stdlib.quick_exit
12511252

12521253
# signal.h entrypoints

libc/include/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ add_header_macro(
360360
../libc/include/stdlib.yaml
361361
stdlib.h
362362
DEPENDS
363+
.llvm-libc-macros.annex_k_macros
363364
.llvm-libc-macros.null_macro
364365
.llvm-libc-macros.stdlib_macros
365366
.llvm-libc-types.__atexithandler_t

libc/include/stdlib.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ functions:
110110
return_type: char *
111111
arguments:
112112
- type: const char *
113+
- name: ignore_handler_s
114+
standards:
115+
- stdc
116+
return_type: void
117+
arguments:
118+
- type: const char *__restrict
119+
- type: void *__restrict
120+
- type: errno_t
121+
guard: 'LIBC_HAS_ANNEX_K'
113122
- name: labs
114123
standards:
115124
- stdc

libc/src/stdlib/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,3 +653,16 @@ add_entrypoint_object(
653653
DEPENDS
654654
.${LIBC_TARGET_OS}.system
655655
)
656+
657+
add_entrypoint_object(
658+
ignore_handler_s
659+
HDRS
660+
ignore_handler_s.h
661+
SRCS
662+
ignore_handler_s.cpp
663+
DEPENDS
664+
libc.hdr.types.errno_t
665+
libc.src.__support.libc_errno
666+
libc.src.__support.macros.config
667+
libc.src.__support.macros.attributes
668+
)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//===-- Implementation header for ignore_handler_s --------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#include "src/stdlib/ignore_handler_s.h"
10+
11+
namespace LIBC_NAMESPACE_DECL {
12+
13+
LLVM_LIBC_FUNCTION(void, ignore_handler_s,
14+
(const char *__restrict, void *__restrict, errno_t)) {}
15+
16+
} // namespace LIBC_NAMESPACE_DECL

libc/src/stdlib/ignore_handler_s.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//===-- Implementation header for ignore_handler_s --------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SRC_STDLIB_IGNORE_HANDLER_S_H
10+
#define LLVM_LIBC_SRC_STDLIB_IGNORE_HANDLER_S_H
11+
12+
#include "hdr/types/errno_t.h"
13+
#include "src/__support/common.h"
14+
15+
namespace LIBC_NAMESPACE_DECL {
16+
17+
void ignore_handler_s(const char *__restrict msg, void *__restrict ptr,
18+
errno_t error);
19+
20+
} // namespace LIBC_NAMESPACE_DECL
21+
22+
#endif // LLVM_LIBC_SRC_STDLIB_IGNORE_HANDLER_S_H

0 commit comments

Comments
 (0)