Skip to content

Commit ab947f3

Browse files
committed
[libc][stdlib][annex_k] Add ignore_handler_s.
1 parent 6a9bfac commit ab947f3

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
@@ -1081,6 +1081,7 @@ if(LLVM_LIBC_FULL_BUILD)
10811081
libc.src.stdlib.atexit
10821082
libc.src.stdlib.exit
10831083
libc.src.stdlib.getenv
1084+
libc.src.stdlib.ignore_handler_s
10841085
libc.src.stdlib.quick_exit
10851086

10861087
# signal.h entrypoints

libc/config/linux/riscv/entrypoints.txt

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

12141215
# signal.h entrypoints

libc/config/linux/x86_64/entrypoints.txt

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

12531254
# 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
@@ -113,6 +113,15 @@ functions:
113113
return_type: char *
114114
arguments:
115115
- type: const char *
116+
- name: ignore_handler_s
117+
standards:
118+
- stdc
119+
return_type: void
120+
arguments:
121+
- type: const char *__restrict
122+
- type: void *__restrict
123+
- type: errno_t
124+
guard: 'LIBC_HAS_ANNEX_K'
116125
- name: labs
117126
standards:
118127
- stdc

libc/src/stdlib/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,3 +663,16 @@ add_entrypoint_object(
663663
DEPENDS
664664
.${LIBC_TARGET_OS}.system
665665
)
666+
667+
add_entrypoint_object(
668+
ignore_handler_s
669+
HDRS
670+
ignore_handler_s.h
671+
SRCS
672+
ignore_handler_s.cpp
673+
DEPENDS
674+
libc.hdr.types.errno_t
675+
libc.src.__support.libc_errno
676+
libc.src.__support.macros.config
677+
libc.src.__support.macros.attributes
678+
)
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)