Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[libc] Add proxy header for ENTRY type. #139746

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
May 13, 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
1 change: 1 addition & 0 deletions 1 libc/fuzzing/__support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add_libc_fuzzer(
SRCS
hashtable_fuzz.cpp
DEPENDS
libc.hdr.types.ENTRY
libc.src.__support.HashTable.table
COMPILE_OPTIONS
-D__LIBC_EXPLICIT_SIMD_OPT
Expand Down
2 changes: 1 addition & 1 deletion 2 libc/fuzzing/__support/hashtable_fuzz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// Fuzzing test for llvm-libc hashtable implementations.
///
//===----------------------------------------------------------------------===//
#include "include/llvm-libc-types/ENTRY.h"
#include "hdr/types/ENTRY.h"
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/HashTable/table.h"
Expand Down
9 changes: 9 additions & 0 deletions 9 libc/hdr/types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,12 @@ add_proxy_header_library(
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.cpu_set_t
)

add_proxy_header_library(
ENTRY
HDRS
ENTRY.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.ENTRY
libc.include.search
)
22 changes: 22 additions & 0 deletions 22 libc/hdr/types/ENTRY.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//===-- Proxy header for ENTRY --------------------------------------------===//
//
// 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_HDR_TYPES_ENTRY_H
#define LLVM_LIBC_HDR_TYPES_ENTRY_H

#ifdef LIBC_FULL_BUILD

#include "include/llvm-libc-types/ENTRY.h"

#else // Overlay mode

#include <search.h>

#endif // LLVM_LIBC_FULL_BUILD

#endif // LLVM_LIBC_HDR_TYPES_ENTRY_H
2 changes: 1 addition & 1 deletion 2 libc/src/__support/HashTable/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ add_header_library(
table.h
DEPENDS
.bitmask
libc.include.llvm-libc-types.ENTRY
libc.hdr.types.ENTRY
libc.src.__support.CPP.bit
libc.src.__support.CPP.new
libc.src.__support.hash
Expand Down
2 changes: 1 addition & 1 deletion 2 libc/src/__support/HashTable/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_HASHTABLE_TABLE_H
#define LLVM_LIBC_SRC___SUPPORT_HASHTABLE_TABLE_H

#include "include/llvm-libc-types/ENTRY.h"
#include "hdr/types/ENTRY.h"
#include "src/__support/CPP/bit.h" // bit_ceil
#include "src/__support/CPP/new.h"
#include "src/__support/HashTable/bitmask.h"
Expand Down
4 changes: 2 additions & 2 deletions 4 libc/src/search/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ add_entrypoint_object(
HDRS
hsearch.h
DEPENDS
libc.hdr.types.ENTRY
libc.src.search.hsearch.global
libc.src.__support.HashTable.table
libc.src.__support.HashTable.randomness
libc.src.errno.errno
libc.include.search
)

add_entrypoint_object(
Expand All @@ -48,9 +48,9 @@ add_entrypoint_object(
HDRS
hsearch_r.h
DEPENDS
libc.hdr.types.ENTRY
libc.src.__support.HashTable.table
libc.src.errno.errno
libc.include.search
)

add_entrypoint_object(
Expand Down
3 changes: 2 additions & 1 deletion 3 libc/src/search/hsearch.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
#ifndef LLVM_LIBC_SRC_SEARCH_HSEARCH_H
#define LLVM_LIBC_SRC_SEARCH_HSEARCH_H

#include "hdr/types/ENTRY.h"
#include "src/__support/macros/config.h"
#include <search.h> // ENTRY, ACTION
#include <search.h> // ACTION

namespace LIBC_NAMESPACE_DECL {
ENTRY *hsearch(ENTRY item, ACTION action);
Expand Down
3 changes: 2 additions & 1 deletion 3 libc/src/search/hsearch_r.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
#ifndef LLVM_LIBC_SRC_SEARCH_HSEARCH_R_H
#define LLVM_LIBC_SRC_SEARCH_HSEARCH_R_H

#include "hdr/types/ENTRY.h"
#include "src/__support/macros/config.h"
#include <search.h> // ENTRY, ACTION
#include <search.h> // ACTION

namespace LIBC_NAMESPACE_DECL {
int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.