Skip to content

[libc] Use proxy headers for limits.h values #102378

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 1 commit into from
Aug 7, 2024
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 libc/src/__support/CPP/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ add_header_library(
limits.h
DEPENDS
.type_traits
libc.hdr.limits_macros
libc.include.llvm-libc-macros.limits_macros
libc.src.__support.macros.properties.types
)
Expand Down
4 changes: 2 additions & 2 deletions libc/src/__support/CPP/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_CPP_LIMITS_H
#define LLVM_LIBC_SRC___SUPPORT_CPP_LIMITS_H

#include "include/llvm-libc-macros/limits-macros.h" // CHAR_BIT
#include "hdr/limits_macros.h" // CHAR_BIT
#include "src/__support/CPP/type_traits/is_integral.h"
#include "src/__support/CPP/type_traits/is_signed.h"
#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128

Expand Down
8 changes: 7 additions & 1 deletion utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ libc_support_library(
hdrs = ["hdr/stdio_macros.h"],
)


libc_support_library(
name = "hdr_limits_macros",
hdrs = ["hdr/limits_macros.h"],
)

############################ Type Proxy Header Files ###########################

libc_support_library(
Expand Down Expand Up @@ -362,7 +368,7 @@ libc_support_library(
"__support_cpp_type_traits",
"__support_macros_attributes",
":__support_macros_properties_types",
":llvm_libc_macros_limits_macros",
":hdr_limits_macros",
],
)

Expand Down
Loading