Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libc/config/linux/aarch64/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@ if(LLVM_LIBC_FULL_BUILD)
libc.src.stdlib.atexit
libc.src.stdlib.exit
libc.src.stdlib.getenv
libc.src.stdlib.ignore_handler_s
libc.src.stdlib.quick_exit

# signal.h entrypoints
Expand Down
1 change: 1 addition & 0 deletions libc/config/linux/riscv/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,7 @@ if(LLVM_LIBC_FULL_BUILD)
libc.src.stdlib.atexit
libc.src.stdlib.exit
libc.src.stdlib.getenv
libc.src.stdlib.ignore_handler_s
libc.src.stdlib.quick_exit

# signal.h entrypoints
Expand Down
1 change: 1 addition & 0 deletions libc/config/linux/x86_64/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,7 @@ if(LLVM_LIBC_FULL_BUILD)
libc.src.stdlib.atexit
libc.src.stdlib.exit
libc.src.stdlib.getenv
libc.src.stdlib.ignore_handler_s
libc.src.stdlib.quick_exit

# signal.h entrypoints
Expand Down
1 change: 1 addition & 0 deletions libc/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ add_header_macro(
../libc/include/stdlib.yaml
stdlib.h
DEPENDS
.llvm-libc-macros.annex_k_macros
.llvm-libc-macros.null_macro
.llvm-libc-macros.stdlib_macros
.llvm-libc-types.__atexithandler_t
Expand Down
9 changes: 9 additions & 0 deletions libc/include/stdlib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ functions:
return_type: char *
arguments:
- type: const char *
- name: ignore_handler_s
standards:
- stdc
return_type: void
arguments:
- type: const char *__restrict
- type: void *__restrict
- type: errno_t
guard: 'LIBC_HAS_ANNEX_K'
- name: labs
standards:
- stdc
Expand Down
13 changes: 13 additions & 0 deletions libc/src/stdlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -663,3 +663,16 @@ add_entrypoint_object(
DEPENDS
.${LIBC_TARGET_OS}.system
)

add_entrypoint_object(
ignore_handler_s
HDRS
ignore_handler_s.h
SRCS
ignore_handler_s.cpp
DEPENDS
libc.hdr.types.errno_t
libc.src.__support.libc_errno
libc.src.__support.macros.config
libc.src.__support.macros.attributes
)
16 changes: 16 additions & 0 deletions libc/src/stdlib/ignore_handler_s.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//===-- Implementation header for ignore_handler_s --------------*- 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
//
//===----------------------------------------------------------------------===//

#include "src/stdlib/ignore_handler_s.h"

namespace LIBC_NAMESPACE_DECL {

LLVM_LIBC_FUNCTION(void, ignore_handler_s,
(const char *__restrict, void *__restrict, errno_t)) {}

} // namespace LIBC_NAMESPACE_DECL
22 changes: 22 additions & 0 deletions libc/src/stdlib/ignore_handler_s.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//===-- Implementation header for ignore_handler_s --------------*- 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_STDLIB_IGNORE_HANDLER_S_H
#define LLVM_LIBC_SRC_STDLIB_IGNORE_HANDLER_S_H

#include "hdr/types/errno_t.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE_DECL {

void ignore_handler_s(const char *__restrict msg, void *__restrict ptr,
errno_t error);

} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SRC_STDLIB_IGNORE_HANDLER_S_H
Loading