-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc++][NFC] Move __format/format_fwd.h to __fwd/format.h #84336
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
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-libcxx Author: Nikolas Klauser (philnik777) ChangesFull diff: https://github.com/llvm/llvm-project/pull/84336.diff 10 Files Affected:
diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index 3ea3360186dc56..e37c4ac4fddd8c 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -380,7 +380,6 @@ set(files
__format/format_context.h
__format/format_error.h
__format/format_functions.h
- __format/format_fwd.h
__format/format_parse_context.h
__format/format_string.h
__format/format_to_n_result.h
@@ -430,6 +429,7 @@ set(files
__fwd/array.h
__fwd/bit_reference.h
__fwd/complex.h
+ __fwd/format.h
__fwd/fstream.h
__fwd/functional.h
__fwd/ios.h
diff --git a/libcxx/include/__format/concepts.h b/libcxx/include/__format/concepts.h
index 299c5f40ee35b4..d7b5a9d16df70a 100644
--- a/libcxx/include/__format/concepts.h
+++ b/libcxx/include/__format/concepts.h
@@ -13,8 +13,8 @@
#include <__concepts/same_as.h>
#include <__concepts/semiregular.h>
#include <__config>
-#include <__format/format_fwd.h>
#include <__format/format_parse_context.h>
+#include <__fwd/format.h>
#include <__type_traits/is_specialization.h>
#include <__type_traits/remove_const.h>
#include <__utility/pair.h>
diff --git a/libcxx/include/__format/format_arg.h b/libcxx/include/__format/format_arg.h
index b786ac3b3620e3..4924e5fb325336 100644
--- a/libcxx/include/__format/format_arg.h
+++ b/libcxx/include/__format/format_arg.h
@@ -14,9 +14,9 @@
#include <__concepts/arithmetic.h>
#include <__config>
#include <__format/concepts.h>
-#include <__format/format_fwd.h>
#include <__format/format_parse_context.h>
#include <__functional/invoke.h>
+#include <__fwd/format.h>
#include <__memory/addressof.h>
#include <__type_traits/conditional.h>
#include <__utility/forward.h>
diff --git a/libcxx/include/__format/format_args.h b/libcxx/include/__format/format_args.h
index 9e0afecc0ae967..79fe51f96c6a50 100644
--- a/libcxx/include/__format/format_args.h
+++ b/libcxx/include/__format/format_args.h
@@ -14,7 +14,7 @@
#include <__config>
#include <__format/format_arg.h>
#include <__format/format_arg_store.h>
-#include <__format/format_fwd.h>
+#include <__fwd/format.h>
#include <cstddef>
#include <cstdint>
diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h
index 68dcdb49d3aae6..d131e942aca60b 100644
--- a/libcxx/include/__format/format_context.h
+++ b/libcxx/include/__format/format_context.h
@@ -18,7 +18,7 @@
#include <__format/format_arg_store.h>
#include <__format/format_args.h>
#include <__format/format_error.h>
-#include <__format/format_fwd.h>
+#include <__fwd/format.h>
#include <__iterator/back_insert_iterator.h>
#include <__iterator/concepts.h>
#include <__memory/addressof.h>
diff --git a/libcxx/include/__format/formatter.h b/libcxx/include/__format/formatter.h
index 079befc5bd9ca6..47e35789b8175b 100644
--- a/libcxx/include/__format/formatter.h
+++ b/libcxx/include/__format/formatter.h
@@ -12,7 +12,7 @@
#include <__availability>
#include <__config>
-#include <__format/format_fwd.h>
+#include <__fwd/format.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/libcxx/include/__format/format_fwd.h b/libcxx/include/__fwd/format.h
similarity index 89%
rename from libcxx/include/__format/format_fwd.h
rename to libcxx/include/__fwd/format.h
index 120b2fc8d47de8..6f5c71243711fe 100644
--- a/libcxx/include/__format/format_fwd.h
+++ b/libcxx/include/__fwd/format.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___FORMAT_FORMAT_FWD_H
-#define _LIBCPP___FORMAT_FORMAT_FWD_H
+#ifndef _LIBCPP___FWD_FORMAT_H
+#define _LIBCPP___FWD_FORMAT_H
#include <__availability>
#include <__config>
@@ -36,4 +36,4 @@ struct _LIBCPP_TEMPLATE_VIS formatter;
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___FORMAT_FORMAT_FWD_H
+#endif // _LIBCPP___FWD_FORMAT_H
diff --git a/libcxx/include/format b/libcxx/include/format
index b2fe0053b974bb..c0485c5a103596 100644
--- a/libcxx/include/format
+++ b/libcxx/include/format
@@ -199,7 +199,6 @@ namespace std {
#include <__format/format_context.h>
#include <__format/format_error.h>
#include <__format/format_functions.h>
-#include <__format/format_fwd.h>
#include <__format/format_parse_context.h>
#include <__format/format_string.h>
#include <__format/format_to_n_result.h>
@@ -215,6 +214,7 @@ namespace std {
#include <__format/range_default_formatter.h>
#include <__format/range_formatter.h>
#include <__format/unicode.h>
+#include <__fwd/format.h>
#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/libcxx.imp b/libcxx/include/libcxx.imp
index cdbb0a63fc0eae..e02dc8da6ba182 100644
--- a/libcxx/include/libcxx.imp
+++ b/libcxx/include/libcxx.imp
@@ -374,7 +374,6 @@
{ include: [ "<__format/format_context.h>", "private", "<format>", "public" ] },
{ include: [ "<__format/format_error.h>", "private", "<format>", "public" ] },
{ include: [ "<__format/format_functions.h>", "private", "<format>", "public" ] },
- { include: [ "<__format/format_fwd.h>", "private", "<format>", "public" ] },
{ include: [ "<__format/format_parse_context.h>", "private", "<format>", "public" ] },
{ include: [ "<__format/format_string.h>", "private", "<format>", "public" ] },
{ include: [ "<__format/format_to_n_result.h>", "private", "<format>", "public" ] },
@@ -425,6 +424,7 @@
{ include: [ "<__fwd/bit_reference.h>", "private", "<bitset>", "public" ] },
{ include: [ "<__fwd/bit_reference.h>", "private", "<vector>", "public" ] },
{ include: [ "<__fwd/complex.h>", "private", "<complex>", "public" ] },
+ { include: [ "<__fwd/format.h>", "private", "<format>", "public" ] },
{ include: [ "<__fwd/fstream.h>", "private", "<iosfwd>", "public" ] },
{ include: [ "<__fwd/functional.h>", "private", "<functional>", "public" ] },
{ include: [ "<__fwd/ios.h>", "private", "<iosfwd>", "public" ] },
diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index b247f97c1804d9..98890e890cdb13 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -1315,7 +1315,7 @@ module std_private_format_format_functions [system] {
header "__format/format_functions.h"
export std_string
}
-module std_private_format_format_fwd [system] { header "__format/format_fwd.h" }
+module std_private_format_fwd [system] { header "__fwd/format.h" }
module std_private_format_format_parse_context [system] { header "__format/format_parse_context.h" }
module std_private_format_format_string [system] { header "__format/format_string.h" }
module std_private_format_format_to_n_result [system] {
|
ldionne
approved these changes
Mar 7, 2024
9ed9287
to
e3f1daa
Compare
e3f1daa
to
603f1bd
Compare
mordante
approved these changes
Mar 8, 2024
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!
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.
No description provided.