Skip to content

Commit c5ec5ee

Browse files
committed
[libc][stdlib][annex_k] Add ignore_handler_s.
1 parent e99eeb3 commit c5ec5ee

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
@@ -1082,6 +1082,7 @@ if(LLVM_LIBC_FULL_BUILD)
10821082
libc.src.stdlib.atexit
10831083
libc.src.stdlib.exit
10841084
libc.src.stdlib.getenv
1085+
libc.src.stdlib.ignore_handler_s
10851086
libc.src.stdlib.quick_exit
10861087

10871088
# signal.h entrypoints

libc/config/linux/riscv/entrypoints.txt

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

12151216
# signal.h entrypoints

libc/config/linux/x86_64/entrypoints.txt

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

12541255
# signal.h entrypoints

libc/include/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ add_header_macro(
363363
../libc/include/stdlib.yaml
364364
stdlib.h
365365
DEPENDS
366+
.llvm-libc-macros.annex_k_macros
366367
.llvm-libc-macros.null_macro
367368
.llvm-libc-macros.stdlib_macros
368369
.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)