Skip to content

Commit 2da8584

Browse files
author
git apple-llvm automerger
committed
Merge commit '79e8e27bfebe' from llvm.org/main into next
2 parents 1bf323f + 79e8e27 commit 2da8584

File tree

5 files changed

+36
-2
lines changed

5 files changed

+36
-2
lines changed

libc/hdr/types/ACTION.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//===-- Proxy header for ACTION -------------------------------------------===//
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_HDR_TYPES_ACTION_H
10+
#define LLVM_LIBC_HDR_TYPES_ACTION_H
11+
12+
#ifdef LIBC_FULL_BUILD
13+
14+
#include "include/llvm-libc-types/ACTION.h"
15+
16+
#else // Overlay mode
17+
18+
#include <search.h>
19+
20+
#endif // LLVM_LIBC_FULL_BUILD
21+
22+
#endif // LLVM_LIBC_HDR_TYPES_ACTION_H

libc/hdr/types/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,3 +383,12 @@ add_proxy_header_library(
383383
libc.include.llvm-libc-types.ENTRY
384384
libc.include.search
385385
)
386+
387+
add_proxy_header_library(
388+
ACTION
389+
HDRS
390+
ACTION.h
391+
FULL_BUILD_DEPENDS
392+
libc.include.llvm-libc-types.ACTION
393+
libc.include.search
394+
)

libc/src/search/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ add_entrypoint_object(
3434
HDRS
3535
hsearch.h
3636
DEPENDS
37+
libc.hdr.types.ACTION
3738
libc.hdr.types.ENTRY
3839
libc.src.search.hsearch.global
3940
libc.src.__support.HashTable.table
@@ -48,6 +49,7 @@ add_entrypoint_object(
4849
HDRS
4950
hsearch_r.h
5051
DEPENDS
52+
libc.hdr.types.ACTION
5153
libc.hdr.types.ENTRY
5254
libc.src.__support.HashTable.table
5355
libc.src.errno.errno

libc/src/search/hsearch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#ifndef LLVM_LIBC_SRC_SEARCH_HSEARCH_H
1010
#define LLVM_LIBC_SRC_SEARCH_HSEARCH_H
1111

12+
#include "hdr/types/ACTION.h"
1213
#include "hdr/types/ENTRY.h"
1314
#include "src/__support/macros/config.h"
14-
#include <search.h> // ACTION
1515

1616
namespace LIBC_NAMESPACE_DECL {
1717
ENTRY *hsearch(ENTRY item, ACTION action);

libc/src/search/hsearch_r.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
#ifndef LLVM_LIBC_SRC_SEARCH_HSEARCH_R_H
1010
#define LLVM_LIBC_SRC_SEARCH_HSEARCH_R_H
1111

12+
#include "hdr/types/ACTION.h"
1213
#include "hdr/types/ENTRY.h"
1314
#include "src/__support/macros/config.h"
14-
#include <search.h> // ACTION
15+
#include <search.h> // hsearch_data
1516

1617
namespace LIBC_NAMESPACE_DECL {
1718
int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,

0 commit comments

Comments
 (0)