[libcxx-commits] [PATCH] D128661: [libc++] Re-add transitive includes that had been removed since LLVM 14

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 27 09:10:37 PDT 2022


ldionne created this revision.
Herald added subscribers: miyuki, arphaman.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This commit re-adds transitive includes that had been removed by
4cd04d1687f1 <https://reviews.llvm.org/rG4cd04d1687f1096990119304a3eb22081ab4bb29>, c36870c8e79c <https://reviews.llvm.org/rGc36870c8e79c1690432076c69cb98a879555efa8>, a83f4b9cda57 <https://reviews.llvm.org/rGa83f4b9cda57c5b3d414ec3bcf9ac891b2ec27e1>, 1458458b558d <https://reviews.llvm.org/rG1458458b558d3cbce5a8b1845ed43bbe141db2fd>, 2e2f3158c604 <https://reviews.llvm.org/rG2e2f3158c604adb8401a2a44a03f58d4b6f1c7f9>,
and 489637e66dd3 <https://reviews.llvm.org/rG489637e66dd38d29517d16da1afaee60485687d1>. This should cover all the includes that had been
removed since LLVM 14 and that would contribute to breaking user code
when releasing LLVM 15.

It is possible to disable the inclusion of these headers by defining
_LIBCPP_REMOVE_TRANSITIVE_INCLUDES. The intent is that vendors will
enable that macro and start fixing downstream issues immediately. We
can then remove the macro (and the transitive includes) by default in
a future release. That way, we will break users only once by removing
transitive includes in bulk instead of doing it bit by bit a every
release, which is more disruptive for users.

Note 1: The set of headers to re-add was found by re-generating the

  transitive include test on a checkout of release/14.x, which
  provided the list of all transitive includes we used to provide.

Note 2: Several includes of <vector>, <optional>, <array> and <unordered_map>

  have been added in this commit. These transitive inclusions were
  added when we implemented boyer_moore_searcher in <functional>.

Note 3: This is a best effort patch to try and resolve downstream breakage

  caused since branching LLVM 14. I wasn't able to perfectly mirror
  transitive includes in LLVM 14 for a few headers like <unordered_map>
  and <optional> due to circular dependencies.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128661

Files:
  libcxx/docs/ReleaseNotes.rst
  libcxx/include/algorithm
  libcxx/include/any
  libcxx/include/array
  libcxx/include/atomic
  libcxx/include/bit
  libcxx/include/charconv
  libcxx/include/coroutine
  libcxx/include/deque
  libcxx/include/experimental/coroutine
  libcxx/include/experimental/functional
  libcxx/include/experimental/memory_resource
  libcxx/include/experimental/propagate_const
  libcxx/include/experimental/simd
  libcxx/include/experimental/unordered_map
  libcxx/include/ext/hash_map
  libcxx/include/ext/hash_set
  libcxx/include/forward_list
  libcxx/include/functional
  libcxx/include/future
  libcxx/include/iterator
  libcxx/include/list
  libcxx/include/locale
  libcxx/include/map
  libcxx/include/memory
  libcxx/include/mutex
  libcxx/include/numeric
  libcxx/include/optional
  libcxx/include/ostream
  libcxx/include/queue
  libcxx/include/random
  libcxx/include/regex
  libcxx/include/set
  libcxx/include/span
  libcxx/include/string
  libcxx/include/string_view
  libcxx/include/thread
  libcxx/include/tuple
  libcxx/include/typeindex
  libcxx/include/unordered_map
  libcxx/include/unordered_set
  libcxx/include/utility
  libcxx/include/valarray
  libcxx/include/variant
  libcxx/include/vector
  libcxx/test/libcxx/transitive_includes/expected.algorithm
  libcxx/test/libcxx/transitive_includes/expected.any
  libcxx/test/libcxx/transitive_includes/expected.array
  libcxx/test/libcxx/transitive_includes/expected.atomic
  libcxx/test/libcxx/transitive_includes/expected.barrier
  libcxx/test/libcxx/transitive_includes/expected.bit
  libcxx/test/libcxx/transitive_includes/expected.bitset
  libcxx/test/libcxx/transitive_includes/expected.ccomplex
  libcxx/test/libcxx/transitive_includes/expected.charconv
  libcxx/test/libcxx/transitive_includes/expected.codecvt
  libcxx/test/libcxx/transitive_includes/expected.complex
  libcxx/test/libcxx/transitive_includes/expected.condition_variable
  libcxx/test/libcxx/transitive_includes/expected.coroutine
  libcxx/test/libcxx/transitive_includes/expected.ctgmath
  libcxx/test/libcxx/transitive_includes/expected.deque
  libcxx/test/libcxx/transitive_includes/expected.experimental_algorithm
  libcxx/test/libcxx/transitive_includes/expected.experimental_coroutine
  libcxx/test/libcxx/transitive_includes/expected.experimental_deque
  libcxx/test/libcxx/transitive_includes/expected.experimental_forward_list
  libcxx/test/libcxx/transitive_includes/expected.experimental_functional
  libcxx/test/libcxx/transitive_includes/expected.experimental_iterator
  libcxx/test/libcxx/transitive_includes/expected.experimental_list
  libcxx/test/libcxx/transitive_includes/expected.experimental_map
  libcxx/test/libcxx/transitive_includes/expected.experimental_memory_resource
  libcxx/test/libcxx/transitive_includes/expected.experimental_propagate_const
  libcxx/test/libcxx/transitive_includes/expected.experimental_regex
  libcxx/test/libcxx/transitive_includes/expected.experimental_set
  libcxx/test/libcxx/transitive_includes/expected.experimental_simd
  libcxx/test/libcxx/transitive_includes/expected.experimental_string
  libcxx/test/libcxx/transitive_includes/expected.experimental_unordered_map
  libcxx/test/libcxx/transitive_includes/expected.experimental_unordered_set
  libcxx/test/libcxx/transitive_includes/expected.experimental_utility
  libcxx/test/libcxx/transitive_includes/expected.experimental_vector
  libcxx/test/libcxx/transitive_includes/expected.ext_hash_map
  libcxx/test/libcxx/transitive_includes/expected.ext_hash_set
  libcxx/test/libcxx/transitive_includes/expected.filesystem
  libcxx/test/libcxx/transitive_includes/expected.format
  libcxx/test/libcxx/transitive_includes/expected.forward_list
  libcxx/test/libcxx/transitive_includes/expected.fstream
  libcxx/test/libcxx/transitive_includes/expected.functional
  libcxx/test/libcxx/transitive_includes/expected.future
  libcxx/test/libcxx/transitive_includes/expected.iomanip
  libcxx/test/libcxx/transitive_includes/expected.ios
  libcxx/test/libcxx/transitive_includes/expected.iostream
  libcxx/test/libcxx/transitive_includes/expected.istream
  libcxx/test/libcxx/transitive_includes/expected.iterator
  libcxx/test/libcxx/transitive_includes/expected.latch
  libcxx/test/libcxx/transitive_includes/expected.list
  libcxx/test/libcxx/transitive_includes/expected.locale
  libcxx/test/libcxx/transitive_includes/expected.map
  libcxx/test/libcxx/transitive_includes/expected.memory
  libcxx/test/libcxx/transitive_includes/expected.mutex
  libcxx/test/libcxx/transitive_includes/expected.numeric
  libcxx/test/libcxx/transitive_includes/expected.optional
  libcxx/test/libcxx/transitive_includes/expected.ostream
  libcxx/test/libcxx/transitive_includes/expected.queue
  libcxx/test/libcxx/transitive_includes/expected.random
  libcxx/test/libcxx/transitive_includes/expected.ranges
  libcxx/test/libcxx/transitive_includes/expected.regex
  libcxx/test/libcxx/transitive_includes/expected.scoped_allocator
  libcxx/test/libcxx/transitive_includes/expected.semaphore
  libcxx/test/libcxx/transitive_includes/expected.set
  libcxx/test/libcxx/transitive_includes/expected.shared_mutex
  libcxx/test/libcxx/transitive_includes/expected.span
  libcxx/test/libcxx/transitive_includes/expected.sstream
  libcxx/test/libcxx/transitive_includes/expected.stack
  libcxx/test/libcxx/transitive_includes/expected.streambuf
  libcxx/test/libcxx/transitive_includes/expected.string
  libcxx/test/libcxx/transitive_includes/expected.string_view
  libcxx/test/libcxx/transitive_includes/expected.strstream
  libcxx/test/libcxx/transitive_includes/expected.system_error
  libcxx/test/libcxx/transitive_includes/expected.thread
  libcxx/test/libcxx/transitive_includes/expected.tuple
  libcxx/test/libcxx/transitive_includes/expected.typeindex
  libcxx/test/libcxx/transitive_includes/expected.unordered_map
  libcxx/test/libcxx/transitive_includes/expected.unordered_set
  libcxx/test/libcxx/transitive_includes/expected.utility
  libcxx/test/libcxx/transitive_includes/expected.valarray
  libcxx/test/libcxx/transitive_includes/expected.variant
  libcxx/test/libcxx/transitive_includes/expected.vector

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128661.440257.patch
Type: text/x-patch
Size: 63511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220627/9f0b7ca4/attachment-0001.bin>


More information about the libcxx-commits mailing list