-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc] Use proxy header in the locale
implementation.
#130982
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-libc Author: Connector Switch (c8ef) ChangesAddress review comments in #130621 (review). Some unused headers are also removed. Full diff: https://github.com/llvm/llvm-project/pull/130982.diff 8 Files Affected:
diff --git a/libc/src/locale/CMakeLists.txt b/libc/src/locale/CMakeLists.txt
index 6aaeb2ac31488..9a3abf76a55c5 100644
--- a/libc/src/locale/CMakeLists.txt
+++ b/libc/src/locale/CMakeLists.txt
@@ -5,7 +5,7 @@ add_object_library(
HDRS
locale.h
DEPENDS
- libc.include.locale
+ libc.hdr.types.locale_t
)
add_entrypoint_object(
@@ -27,7 +27,8 @@ add_entrypoint_object(
HDRS
newlocale.h
DEPENDS
- libc.include.locale
+ libc.hdr.locale_macros
+ libc.hdr.types.locale_t
.locale
)
@@ -38,8 +39,7 @@ add_entrypoint_object(
HDRS
duplocale.h
DEPENDS
- libc.include.locale
- .locale
+ libc.hdr.types.locale_t
)
add_entrypoint_object(
@@ -49,8 +49,8 @@ add_entrypoint_object(
HDRS
setlocale.h
DEPENDS
- libc.include.locale
- .locale
+ libc.hdr.locale_macros
+ libc.hdr.types.locale_t
)
add_entrypoint_object(
@@ -60,7 +60,7 @@ add_entrypoint_object(
HDRS
uselocale.h
DEPENDS
- libc.include.locale
+ libc.hdr.types.locale_t
.locale
)
@@ -71,6 +71,5 @@ add_entrypoint_object(
HDRS
freelocale.h
DEPENDS
- libc.include.locale
- .locale
+ libc.hdr.types.locale_t
)
diff --git a/libc/src/locale/duplocale.cpp b/libc/src/locale/duplocale.cpp
index d1bd0835121fc..572aff8573d16 100644
--- a/libc/src/locale/duplocale.cpp
+++ b/libc/src/locale/duplocale.cpp
@@ -7,10 +7,6 @@
//===----------------------------------------------------------------------===//
#include "src/locale/duplocale.h"
-#include "include/llvm-libc-macros/locale-macros.h"
-#include "src/locale/locale.h"
-
-#include "src/__support/CPP/string_view.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
diff --git a/libc/src/locale/freelocale.cpp b/libc/src/locale/freelocale.cpp
index 2008995f101bf..2e1631d4ec40b 100644
--- a/libc/src/locale/freelocale.cpp
+++ b/libc/src/locale/freelocale.cpp
@@ -7,10 +7,6 @@
//===----------------------------------------------------------------------===//
#include "src/locale/freelocale.h"
-#include "include/llvm-libc-macros/locale-macros.h"
-#include "src/locale/locale.h"
-
-#include "src/__support/CPP/string_view.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
diff --git a/libc/src/locale/locale.cpp b/libc/src/locale/locale.cpp
index 1610fb5dd3400..2f7e13fb1d6f7 100644
--- a/libc/src/locale/locale.cpp
+++ b/libc/src/locale/locale.cpp
@@ -7,8 +7,6 @@
//===----------------------------------------------------------------------===//
#include "src/locale/locale.h"
-
-#include "include/llvm-libc-macros/locale-macros.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
diff --git a/libc/src/locale/newlocale.cpp b/libc/src/locale/newlocale.cpp
index 379e7e6385d09..2c36465bb61a3 100644
--- a/libc/src/locale/newlocale.cpp
+++ b/libc/src/locale/newlocale.cpp
@@ -7,12 +7,11 @@
//===----------------------------------------------------------------------===//
#include "src/locale/newlocale.h"
-#include "include/llvm-libc-macros/locale-macros.h"
-#include "src/locale/locale.h"
-
+#include "hdr/locale_macros.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
+#include "src/locale/locale.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/locale/newlocale.h b/libc/src/locale/newlocale.h
index 08a0071cb7aea..07972fa384433 100644
--- a/libc/src/locale/newlocale.h
+++ b/libc/src/locale/newlocale.h
@@ -9,9 +9,8 @@
#ifndef LLVM_LIBC_SRC_LOCALE_SETLOCALE_H
#define LLVM_LIBC_SRC_LOCALE_SETLOCALE_H
-#include "src/__support/macros/config.h"
-
#include "hdr/types/locale_t.h"
+#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/locale/setlocale.cpp b/libc/src/locale/setlocale.cpp
index 0950ad73cbe2c..2dec497ce051a 100644
--- a/libc/src/locale/setlocale.cpp
+++ b/libc/src/locale/setlocale.cpp
@@ -7,9 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/locale/setlocale.h"
-#include "include/llvm-libc-macros/locale-macros.h"
-#include "src/locale/locale.h"
-
+#include "hdr/locale_macros.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
diff --git a/libc/src/locale/setlocale.h b/libc/src/locale/setlocale.h
index a9213cf409a7b..8e32fd42f41d9 100644
--- a/libc/src/locale/setlocale.h
+++ b/libc/src/locale/setlocale.h
@@ -9,9 +9,8 @@
#ifndef LLVM_LIBC_SRC_LOCALE_SETLOCALE_H
#define LLVM_LIBC_SRC_LOCALE_SETLOCALE_H
-#include "src/__support/macros/config.h"
-
#include "hdr/types/locale_t.h"
+#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
|
michaelrj-google
approved these changes
Mar 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
frederik-h
pushed a commit
to frederik-h/llvm-project
that referenced
this pull request
Mar 18, 2025
Address review comments in llvm#130621 (review). Some unused headers are also removed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Address review comments in #130621 (review).
Some unused headers are also removed.