-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc++] Remove <locale> includes from <format> #85478
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
Conversation
@llvm/pr-subscribers-libcxx Author: Nikolas Klauser (philnik777) ChangesThis reduces the include time from 767ms to 691ms. Full diff: https://github.com/llvm/llvm-project/pull/85478.diff 3 Files Affected:
diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h
index d131e942aca60b..bf603c5c62d9db 100644
--- a/libcxx/include/__format/format_context.h
+++ b/libcxx/include/__format/format_context.h
@@ -27,7 +27,7 @@
#include <cstddef>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-# include <locale>
+# include <__locale>
# include <optional>
#endif
diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h
index 3ee53539f4ee6c..c7810140105a07 100644
--- a/libcxx/include/__format/format_functions.h
+++ b/libcxx/include/__format/format_functions.h
@@ -41,7 +41,7 @@
#include <string_view>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-# include <locale>
+# include <__locale>
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__format/formatter_floating_point.h b/libcxx/include/__format/formatter_floating_point.h
index f01d323efff5fc..1d94cc349c0dd6 100644
--- a/libcxx/include/__format/formatter_floating_point.h
+++ b/libcxx/include/__format/formatter_floating_point.h
@@ -39,7 +39,7 @@
#include <cstddef>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-# include <locale>
+# include <__locale>
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
This reduces the include time from 767ms to 691ms.
482dcb9
to
41cbca7
Compare
I'm landing it, since this should be a completely uncontroversial change. |
chrono forward_list | ||
chrono limits | ||
chrono locale |
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.
This looks controversial. Why is it correct to remove this include in C++20. (Not objections the change in C++23 and C++26.)
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.
Oops, I missed that removal. That wasn't meant to be here. Weird though that it's only showing up in C++20.
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.
Thanks for the fix, I just approved it.
I accidentally removed this transitive include in #85478.
This is a follow-up to llvm#85478, similar to llvm#95686.
This reduces the include time from 767ms to 691ms.