[libcxx-commits] [PATCH] D146097: [libc++] Granularize <exception> includes
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 16 08:16:45 PDT 2023
ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: mikhail.ramalho.
I am fine with this in principle, but there seems to be a bit of work needed still. LGTM once CI is green. Also, when you remove transitive includes from a public header, let's add it to a `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` block (even if it might not be needed strictly speaking because the transitive include still exists via a private header). That documents what the public header is including and for what reasons (e.g. `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` implies the reason is legacy), and that's useful to know.
================
Comment at: libcxx/include/__functional/function.h:34-35
#include <__utility/swap.h>
-#include <__verbose_abort>
-#include <exception>
#include <new>
----------------
Are those not needed at all?
================
Comment at: libcxx/include/functional:546
#include <__utility/forward.h>
-#include <exception>
#include <memory> // TODO: find out why removing this breaks the modules build
----------------
Don't we need to add this below to the `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` block?
================
Comment at: libcxx/include/variant:242
-#include <__verbose_abort>
-#include <exception>
#include <initializer_list>
----------------
`_LIBCPP_REMOVE_TRANSITIVE_INCLUDES`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146097/new/
https://reviews.llvm.org/D146097
More information about the libcxx-commits
mailing list