Skip to content

[libc] Combine the function prototype int (*compar)(const void *, const void *) #134238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 3, 2025
Merged
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
20 changes: 10 additions & 10 deletions libc/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@ add_header_macro(
../libc/include/search.yaml
search.h
DEPENDS
.llvm_libc_common_h
.llvm-libc-types.ACTION
.llvm-libc-types.ENTRY
.llvm-libc-types.struct_hsearch_data
.llvm-libc-types.size_t
.llvm-libc-types.VISIT
.llvm-libc-types.__lsearchcompare_t
.llvm-libc-types.__search_compare_t
.llvm-libc-types.size_t
.llvm-libc-types.struct_hsearch_data
.llvm_libc_common_h
)

add_header_macro(
Expand Down Expand Up @@ -343,17 +343,17 @@ add_header_macro(
../libc/include/stdlib.yaml
stdlib.h
DEPENDS
.llvm_libc_common_h
.llvm-libc-macros.stdlib_macros
.llvm-libc-types.__atexithandler_t
.llvm-libc-types.__qsortcompare_t
.llvm-libc-types.__qsortrcompare_t
.llvm-libc-types.__search_compare_t
.llvm-libc-types.div_t
.llvm-libc-types.ldiv_t
.llvm-libc-types.lldiv_t
.llvm-libc-types.size_t
.llvm-libc-types.__bsearchcompare_t
.llvm-libc-types.__qsortcompare_t
.llvm-libc-types.__qsortrcompare_t
.llvm-libc-types.__atexithandler_t
.llvm-libc-types.locale_t
.llvm-libc-types.size_t
.llvm_libc_common_h
)

add_header_macro(
Expand Down
3 changes: 1 addition & 2 deletions libc/include/llvm-libc-types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ add_header(off64_t HDR off64_t.h)
add_header(size_t HDR size_t.h)
add_header(ssize_t HDR ssize_t.h)
add_header(__atfork_callback_t HDR __atfork_callback_t.h)
add_header(__bsearchcompare_t HDR __bsearchcompare_t.h)
add_header(__lsearchcompare_t HDR __lsearchcompare_t.h)
add_header(__search_compare_t HDR __search_compare_t.h)
add_header(__call_once_func_t HDR __call_once_func_t.h)
add_header(__dl_iterate_phdr_callback_t HDR __dl_iterate_phdr_callback_t.h DEPENDS .size_t)
add_header(__exec_argv_t HDR __exec_argv_t.h)
Expand Down
14 changes: 0 additions & 14 deletions libc/include/llvm-libc-types/__lsearchcompare_t.h

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//===-- Definition of type __bsearchcompare_t -----------------------------===//
//===-- Definition of type __search_compare_t -----------------------------===//
//
// 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_TYPES___BSEARCHCOMPARE_T_H
#define LLVM_LIBC_TYPES___BSEARCHCOMPARE_T_H
#ifndef LLVM_LIBC_TYPES___SEARCH_COMPARE_T_H
#define LLVM_LIBC_TYPES___SEARCH_COMPARE_T_H

typedef int (*__bsearchcompare_t)(const void *, const void *);
typedef int (*__search_compare_t)(const void *, const void *);

#endif // LLVM_LIBC_TYPES___BSEARCHCOMPARE_T_H
#endif // LLVM_LIBC_TYPES___SEARCH_COMPARE_T_H
10 changes: 5 additions & 5 deletions libc/include/search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ header: search.h
header_template: search.h.def
macros: []
types:
- type_name: struct_hsearch_data
- type_name: ENTRY
- type_name: ACTION
- type_name: ENTRY
- type_name: VISIT
- type_name: __lsearchcompare_t
- type_name: __search_compare_t
- type_name: struct_hsearch_data
enums: []
objects: []
functions:
Expand Down Expand Up @@ -69,7 +69,7 @@ functions:
- type: const void *
- type: size_t *
- type: size_t
- type: __lsearchcompare_t
- type: __search_compare_t
- name: lsearch
standards:
- POSIX
Expand All @@ -79,4 +79,4 @@ functions:
- type: void *
- type: size_t *
- type: size_t
- type: __lsearchcompare_t
- type: __search_compare_t
6 changes: 3 additions & 3 deletions libc/include/stdlib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ merge_yaml_files:
macros: []
types:
- type_name: __atexithandler_t
- type_name: __qsortrcompare_t
- type_name: __qsortcompare_t
- type_name: __bsearchcompare_t
- type_name: __qsortrcompare_t
- type_name: __search_compare_t
- type_name: div_t
- type_name: ldiv_t
- type_name: lldiv_t
Expand Down Expand Up @@ -87,7 +87,7 @@ functions:
- type: const void *
- type: size_t
- type: size_t
- type: __bsearchcompare_t
- type: __search_compare_t
- name: div
standards:
- stdc
Expand Down
Loading