[libcxx-commits] [PATCH] D116146: [libc++] Remove unused headers from <filesystem>

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 22 07:47:32 PST 2021


Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added a subscriber: Mordante.
Quuxplusone added a comment.

This LGTM%comments. Please address comments, wait for a second libc++ approver (@mordante ping?), and then when you land this, please land it **in two git commits** — one commit that does everything but the removal-of-lines, and then a second commit that does nothing but remove the lines. I think it's likely that this might break someone and then get reverted (especially if it breaks someone over the holiday weekend), so let's make sure that if (when) the removal commit is reverted, the rest of your work here will be in a different commit and thus remain unreverted.



================
Comment at: libcxx/include/filesystem:256
 #include<__filesystem/space_info.h>
 #include<__filesystem/u8path.h>
 #include <compare>
----------------
All these lines should have a space between `include` and `<`.


================
Comment at: libcxx/include/filesystem:258
 #include <compare>
-#include <cstddef>
-#include <cstdlib>
-#include <iosfwd>
-#include <iterator>
-#include <memory>
-#include <stack>
-#include <string>
-#include <string_view>
-#include <system_error>
-#include <utility>
 #include <version>
 
----------------
I'm fairly sure you don't need `<version>` in here. Compare to other granularized headers, such as `<compare>` and `<random>`, which don't include it.
OTOH, `<concepts>`, `<coroutine>`, `<iterator>`, and `<utility>` do include it.
I guess since we're inconsistent, no action is needed either way right now.
I can make a followup PR to remove it from everywhere (or, if that fails tests and/or someone's reading of the Standard, to //add// it everywhere).


================
Comment at: libcxx/include/filesystem:259
-#include <__availability>
-#include <__config>
-#include <__debug>
----------------
Please leave `<__config>`, for consistency with all libc++ headers; but move it into alphabetical order above `<__fil...`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116146/new/

https://reviews.llvm.org/D116146



More information about the libcxx-commits mailing list