[libcxx-commits] [libcxx] [libc++] Include the full set of libc++ transitive includes in the CSV files (PR #107911)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 9 13:40:26 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

<details>
<summary>Changes</summary>

When we introduced the machinery for transitive includes validation, at some point we stopped including the full set of transitive includes in the CSV files and instead only tracked the set of public headers included *directly* by a top-level header.

The reason for doing that was so that the CSV files containing "transitive" includes could be used to draw the dependency graph of libc++ headers. However, the downside was that it made the contents of the CSV files much harder to interpret.

In particular, many changes that modify the CSV files do not in fact modify the effective set of transitive includes, which is confusing. This patch goes back to storing the full set of transitive includes in the CSV files and removes the ability to graph the libc++ includes directly from those CSV files, which we never actually used.

---

Patch is 276.95 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/107911.diff


9 Files Affected:

- (modified) libcxx/test/libcxx/transitive_includes/cxx03.csv (+1597-10) 
- (modified) libcxx/test/libcxx/transitive_includes/cxx11.csv (+1593-10) 
- (modified) libcxx/test/libcxx/transitive_includes/cxx14.csv (+1643-10) 
- (modified) libcxx/test/libcxx/transitive_includes/cxx17.csv (+1612-8) 
- (modified) libcxx/test/libcxx/transitive_includes/cxx20.csv (+1593) 
- (modified) libcxx/test/libcxx/transitive_includes/cxx23.csv (+596) 
- (modified) libcxx/test/libcxx/transitive_includes/cxx26.csv (+596) 
- (modified) libcxx/test/libcxx/transitive_includes_to_csv.py (+4-8) 
- (removed) libcxx/utils/graph_header_deps.py (-46) 


``````````diff
diff --git a/libcxx/test/libcxx/transitive_includes/cxx03.csv b/libcxx/test/libcxx/transitive_includes/cxx03.csv
index 51f38ea086ac02..135a5fda93a16b 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx03.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx03.csv
@@ -1,12 +1,18 @@
 algorithm atomic
 algorithm bit
+algorithm cctype
 algorithm climits
+algorithm cmath
+algorithm compare
 algorithm concepts
 algorithm cstddef
 algorithm cstdint
 algorithm cstdlib
 algorithm cstring
+algorithm ctime
 algorithm cwchar
+algorithm cwctype
+algorithm exception
 algorithm initializer_list
 algorithm iosfwd
 algorithm iterator
@@ -14,43 +20,94 @@ algorithm limits
 algorithm memory
 algorithm new
 algorithm optional
+algorithm ratio
 algorithm stdexcept
+algorithm tuple
 algorithm type_traits
+algorithm typeinfo
 algorithm utility
+algorithm variant
 algorithm version
+any algorithm
+any array
 any atomic
+any bit
+any cctype
+any cerrno
 any chrono
+any climits
+any clocale
+any cmath
+any compare
 any concepts
+any cstdarg
 any cstddef
 any cstdint
+any cstdio
 any cstdlib
 any cstring
+any ctime
+any cwchar
+any cwctype
+any exception
+any forward_list
+any functional
 any initializer_list
+any ios
 any iosfwd
 any iterator
 any limits
+any locale
 any memory
+any mutex
 any new
+any optional
+any ratio
 any stdexcept
+any streambuf
+any string
+any string_view
+any system_error
+any tuple
 any type_traits
 any typeinfo
+any unordered_map
+any utility
 any variant
+any vector
 any version
 array algorithm
+array atomic
+array bit
+array cctype
+array climits
+array cmath
 array compare
 array concepts
 array cstddef
 array cstdint
 array cstdlib
+array cstring
+array ctime
 array cwchar
+array cwctype
+array exception
 array initializer_list
+array iosfwd
 array iterator
 array limits
+array memory
 array new
+array optional
+array ratio
 array stdexcept
+array tuple
 array type_traits
+array typeinfo
 array utility
+array variant
 array version
+atomic climits
 atomic cmath
 atomic compare
 atomic cstddef
@@ -63,18 +120,28 @@ atomic ratio
 atomic type_traits
 atomic version
 barrier atomic
+barrier climits
+barrier cmath
+barrier compare
 barrier concepts
 barrier cstddef
 barrier cstdint
+barrier cstdlib
 barrier cstring
 barrier ctime
+barrier exception
+barrier initializer_list
+barrier iosfwd
 barrier iterator
 barrier limits
 barrier memory
 barrier new
 barrier ratio
 barrier stdexcept
+barrier tuple
 barrier type_traits
+barrier typeinfo
+barrier utility
 barrier variant
 barrier version
 bit cstdint
@@ -83,23 +150,96 @@ bit iosfwd
 bit limits
 bit type_traits
 bit version
+bitset algorithm
+bitset atomic
+bitset bit
+bitset cctype
 bitset climits
+bitset cmath
+bitset compare
 bitset concepts
 bitset cstddef
 bitset cstdint
+bitset cstdio
 bitset cstdlib
 bitset cstring
+bitset ctime
 bitset cwchar
+bitset cwctype
+bitset exception
 bitset initializer_list
 bitset iosfwd
+bitset iterator
 bitset limits
+bitset memory
 bitset new
+bitset optional
+bitset ratio
 bitset stdexcept
 bitset string
 bitset string_view
+bitset tuple
 bitset type_traits
+bitset typeinfo
+bitset utility
+bitset variant
 bitset version
+ccomplex algorithm
+ccomplex array
+ccomplex atomic
+ccomplex bit
+ccomplex bitset
+ccomplex cctype
+ccomplex cerrno
+ccomplex climits
+ccomplex clocale
+ccomplex cmath
+ccomplex compare
 ccomplex complex
+ccomplex concepts
+ccomplex cstdarg
+ccomplex cstddef
+ccomplex cstdint
+ccomplex cstdio
+ccomplex cstdlib
+ccomplex cstring
+ccomplex ctime
+ccomplex cwchar
+ccomplex cwctype
+ccomplex deque
+ccomplex exception
+ccomplex format
+ccomplex functional
+ccomplex initializer_list
+ccomplex ios
+ccomplex iosfwd
+ccomplex istream
+ccomplex iterator
+ccomplex limits
+ccomplex locale
+ccomplex memory
+ccomplex mutex
+ccomplex new
+ccomplex optional
+ccomplex ostream
+ccomplex print
+ccomplex queue
+ccomplex ratio
+ccomplex sstream
+ccomplex stack
+ccomplex stdexcept
+ccomplex streambuf
+ccomplex string
+ccomplex string_view
+ccomplex system_error
+ccomplex tuple
+ccomplex type_traits
+ccomplex typeinfo
+ccomplex unordered_map
+ccomplex utility
+ccomplex variant
+ccomplex vector
+ccomplex version
 charconv cerrno
 charconv cmath
 charconv concepts
@@ -113,45 +253,95 @@ charconv limits
 charconv new
 charconv type_traits
 charconv version
+chrono algorithm
+chrono array
+chrono atomic
 chrono bit
+chrono cctype
+chrono cerrno
+chrono climits
+chrono clocale
+chrono cmath
 chrono compare
 chrono concepts
+chrono cstdarg
 chrono cstddef
 chrono cstdint
+chrono cstdio
+chrono cstdlib
 chrono cstring
 chrono ctime
+chrono cwchar
+chrono cwctype
+chrono exception
 chrono forward_list
+chrono functional
+chrono initializer_list
+chrono ios
+chrono iosfwd
+chrono iterator
 chrono limits
+chrono locale
+chrono memory
+chrono mutex
+chrono new
+chrono optional
 chrono ratio
 chrono stdexcept
+chrono streambuf
 chrono string
 chrono string_view
+chrono system_error
 chrono tuple
 chrono type_traits
+chrono typeinfo
+chrono unordered_map
+chrono utility
+chrono variant
 chrono vector
 chrono version
 cinttypes cstdint
+cmath cstdint
 cmath limits
 cmath type_traits
 cmath version
+codecvt algorithm
 codecvt atomic
+codecvt bit
 codecvt cctype
+codecvt cerrno
+codecvt climits
 codecvt clocale
+codecvt cmath
+codecvt compare
 codecvt concepts
 codecvt cstddef
 codecvt cstdint
+codecvt cstdio
 codecvt cstdlib
 codecvt cstring
+codecvt ctime
 codecvt cwchar
+codecvt cwctype
+codecvt exception
 codecvt initializer_list
 codecvt iosfwd
+codecvt iterator
 codecvt limits
+codecvt memory
 codecvt mutex
 codecvt new
+codecvt optional
+codecvt ratio
 codecvt stdexcept
 codecvt string
+codecvt string_view
+codecvt system_error
+codecvt tuple
 codecvt type_traits
 codecvt typeinfo
+codecvt utility
+codecvt variant
 codecvt version
 compare cmath
 compare cstddef
@@ -159,67 +349,220 @@ compare cstdint
 compare limits
 compare type_traits
 compare version
+complex algorithm
+complex array
+complex atomic
+complex bit
+complex bitset
+complex cctype
+complex cerrno
+complex climits
+complex clocale
 complex cmath
+complex compare
+complex concepts
+complex cstdarg
 complex cstddef
+complex cstdint
+complex cstdio
+complex cstdlib
+complex cstring
+complex ctime
+complex cwchar
+complex cwctype
+complex deque
+complex exception
+complex format
+complex functional
+complex initializer_list
+complex ios
 complex iosfwd
+complex istream
+complex iterator
+complex limits
+complex locale
+complex memory
+complex mutex
+complex new
+complex optional
+complex ostream
+complex print
+complex queue
+complex ratio
 complex sstream
+complex stack
 complex stdexcept
+complex streambuf
+complex string
+complex string_view
+complex system_error
+complex tuple
 complex type_traits
+complex typeinfo
+complex unordered_map
+complex utility
+complex variant
+complex vector
 complex version
 concepts cstddef
+concepts cstdint
 concepts type_traits
 concepts version
+condition_variable algorithm
 condition_variable atomic
+condition_variable bit
+condition_variable cctype
 condition_variable cerrno
+condition_variable climits
+condition_variable cmath
+condition_variable compare
 condition_variable concepts
 condition_variable cstddef
 condition_variable cstdint
+condition_variable cstdio
 condition_variable cstdlib
 condition_variable cstring
 condition_variable ctime
+condition_variable cwchar
+condition_variable cwctype
+condition_variable exception
 condition_variable initializer_list
 condition_variable iosfwd
+condition_variable iterator
 condition_variable limits
+condition_variable memory
 condition_variable new
+condition_variable optional
 condition_variable ratio
 condition_variable stdexcept
 condition_variable string
+condition_variable string_view
 condition_variable system_error
+condition_variable tuple
 condition_variable type_traits
 condition_variable typeinfo
+condition_variable utility
+condition_variable variant
 condition_variable version
+coroutine cmath
 coroutine compare
+coroutine cstddef
+coroutine cstdint
 coroutine iosfwd
 coroutine limits
 coroutine type_traits
 coroutine version
 cstddef version
+ctgmath algorithm
+ctgmath array
+ctgmath atomic
+ctgmath bit
+ctgmath bitset
 ctgmath ccomplex
+ctgmath cctype
+ctgmath cerrno
+ctgmath climits
+ctgmath clocale
 ctgmath cmath
+ctgmath compare
+ctgmath complex
+ctgmath concepts
+ctgmath cstdarg
+ctgmath cstddef
+ctgmath cstdint
+ctgmath cstdio
+ctgmath cstdlib
+ctgmath cstring
+ctgmath ctime
+ctgmath cwchar
+ctgmath cwctype
+ctgmath deque
+ctgmath exception
+ctgmath format
+ctgmath functional
+ctgmath initializer_list
+ctgmath ios
+ctgmath iosfwd
+ctgmath istream
+ctgmath iterator
+ctgmath limits
+ctgmath locale
+ctgmath memory
+ctgmath mutex
+ctgmath new
+ctgmath optional
+ctgmath ostream
+ctgmath print
+ctgmath queue
+ctgmath ratio
+ctgmath sstream
+ctgmath stack
+ctgmath stdexcept
+ctgmath streambuf
+ctgmath string
+ctgmath string_view
+ctgmath system_error
+ctgmath tuple
+ctgmath type_traits
+ctgmath typeinfo
+ctgmath unordered_map
+ctgmath utility
+ctgmath variant
+ctgmath vector
+ctgmath version
+cwchar cctype
 cwchar cstddef
 cwchar cwctype
+cwchar version
 cwctype cctype
 deque algorithm
+deque array
 deque atomic
+deque bit
+deque cctype
+deque cerrno
+deque climits
+deque clocale
+deque cmath
 deque compare
 deque concepts
+deque cstdarg
 deque cstddef
 deque cstdint
+deque cstdio
 deque cstdlib
 deque cstring
+deque ctime
 deque cwchar
+deque cwctype
+deque exception
 deque functional
 deque initializer_list
+deque ios
 deque iosfwd
 deque iterator
 deque limits
+deque locale
+deque memory
+deque mutex
 deque new
+deque optional
+deque ratio
 deque stdexcept
+deque streambuf
+deque string
+deque string_view
+deque system_error
 deque tuple
 deque type_traits
 deque typeinfo
+deque unordered_map
+deque utility
+deque variant
+deque vector
 deque version
 exception cstddef
+exception cstdint
 exception cstdlib
 exception new
 exception type_traits
@@ -228,245 +571,637 @@ exception version
 execution cstddef
 execution version
 expected cstddef
+expected cstdint
+expected cstdlib
 expected initializer_list
 expected new
+expected type_traits
 expected version
+experimental/iterator cmath
+experimental/iterator compare
+experimental/iterator concepts
+experimental/iterator cstddef
+experimental/iterator cstdint
+experimental/iterator cstdlib
+experimental/iterator cstring
+experimental/iterator exception
+experimental/iterator initializer_list
 experimental/iterator iosfwd
 experimental/iterator iterator
+experimental/iterator limits
+experimental/iterator new
+experimental/iterator tuple
 experimental/iterator type_traits
+experimental/iterator typeinfo
+experimental/iterator utility
+experimental/iterator variant
+experimental/iterator version
 experimental/memory cstddef
 experimental/memory cstdint
 experimental/memory cstring
 experimental/memory limits
+experimental/memory type_traits
+experimental/memory version
 experimental/propagate_const cstddef
+experimental/propagate_const cstdint
 experimental/propagate_const type_traits
+experimental/propagate_const version
 experimental/simd cstddef
 experimental/simd cstdint
 experimental/simd limits
+experimental/simd type_traits
+experimental/simd version
+experimental/utility cmath
+experimental/utility compare
+experimental/utility cstddef
+experimental/utility cstdint
+experimental/utility cstdlib
+experimental/utility initializer_list
+experimental/utility iosfwd
+experimental/utility limits
+experimental/utility type_traits
 experimental/utility utility
+experimental/utility version
+filesystem algorithm
+filesystem atomic
+filesystem bit
+filesystem cctype
+filesystem cerrno
+filesystem climits
+filesystem cmath
 filesystem compare
 filesystem concepts
 filesystem cstddef
 filesystem cstdint
+filesystem cstdio
 filesystem cstdlib
 filesystem cstring
 filesystem ctime
-filesystem iomanip
+filesystem cwchar
+filesystem cwctype
+filesystem exception
+filesystem initializer_list
 filesystem iosfwd
+filesystem iterator
 filesystem limits
-filesystem locale
+filesystem memory
 filesystem new
+filesystem optional
 filesystem ratio
+filesystem stdexcept
 filesystem string
 filesystem string_view
 filesystem system_error
+filesystem tuple
 filesystem type_traits
+filesystem typeinfo
+filesystem utility
+filesystem variant
 filesystem version
+format algorithm
 format array
+format atomic
+format bit
 format cctype
 format cerrno
+format climits
 format clocale
 format cmath
+format compare
+format concepts
+format cstdarg
 format cstddef
 format cstdint
+format cstdio
 format cstdlib
 format cstring
+format ctime
 format cwchar
+format cwctype
+format deque
+format exception
+format functional
 format initializer_list
+format ios
+format iosfwd
+format iterator
 format limits
 format locale
+format memory
+format mutex
 format new
 format optional
 format queue
+format ratio
 format stack
 format stdexcept
+format streambuf
 format string
 format string_view
+format system_error
 format tuple
+format type_traits
+format typeinfo
+format unordered_map
+format utility
+format variant
+format vector
 format version
 forward_list algorithm
+forward_list array
 forward_list atomic
+forward_list bit
+forward_list cctype
+forward_list cerrno
+forward_list climits
+forward_list clocale
+forward_list cmath
 forward_list compare
 forward_list concepts
+forward_list cstdarg
 forward_list cstddef
 forward_list cstdint
+forward_list cstdio
 forward_list cstdlib
 forward_list cstring
+forward_list ctime
 forward_list cwchar
+forward_list cwctype
+forward_list exception
 forward_list functional
 forward_list initializer_list
+forward_list ios
 forward_list iosfwd
 forward_list iterator
 forward_list limits
+forward_list locale
+forward_list memory
+forward_list mutex
 forward_list new
+forward_list optional
+forward_list ratio
 forward_list stdexcept
+forward_list streambuf
+forward_list string
+forward_list string_view
+forward_list system_error
 forward_list tuple
 forward_list type_traits
 forward_list typeinfo
+forward_list unordered_map
+forward_list utility
+forward_list variant
+forward_list vector
 forward_list version
+fstream algorithm
+fstream array
 fstream atomic
+fstream bit
+fstream bitset
 fstream cctype
+fstream cerrno
+fstream climits
 fstream clocale
+fstream cmath
+fstream compare
 fstream concepts
+fstream cstdarg
 fstream cstddef
 fstream cstdint
 fstream cstdio
 fstream cstdlib
 fstream cstring
+fstream ctime
 fstream cwchar
+fstream cwctype
+fstream deque
+fstream exception
 fstream filesystem
+fstream format
+fstream functional
 fstream initializer_list
+fstream ios
 fstream iosfwd
 fstream istream
+fstream iterator
 fstream limits
+fstream locale
+fstream memory
 fstream mutex
 fstream new
+fstream optional
 fstream ostream
+fstream print
+fstream queue
+fstream ratio
+fstream stack
 fstream stdexcept
+fstream streambuf
 fstream string
+fstream string_view
+fstream system_error
+fstream tuple
 fstream type_traits
 fstream typeinfo
+fstream unordered_map
+fstream utility
+fstream variant
+fstream vector
 fstream version
+functional algorithm
 functional array
 functional atomic
+functional bit
+functional cctype
+functional cerrno
+functional climits
+functional clocale
+functional cmath
+functional compare
 functional concepts
+functional cstdarg
 functional cstddef
 functional cstdint
+functional cstdio
 functional cstdlib
 functional cstring
+functional ctime
+functional cwchar
+functional cwctype
 functional exception
 functional initializer_list
+functional ios
 functional iosfwd
+functional iterator
 functional limits
+functional locale
 functional memory
+functional mutex
 functional new
+functional optional
+functional ratio
 functional stdexcept
+functional streambuf
+functional string
+functional string_view
+functional system_error
 functional tuple
 functional type_traits
 functional typeinfo
 functional unordered_map
 functional utility
+functional variant
 functional vector
 functional version
+future algorithm
+future array
 future atomic
+future bit
+future bitset
+future cctype
 future cerrno
 future chrono
+future climits
+future clocale
+future cmath
+future compare
+future concepts
+future cstdarg
 future cstddef
 future cstdint
+future cstdio
 future cstdlib
 future cstring
+future ctime
+future cwchar
+future cwctype
+future deque
 future exception
+future format
+future forward_list
+future functional
 future initializer_list
+future ios
 future iosfwd
+future istream
+future iterator
 future limits
+future locale
+future memory
 future mutex
 future new
+future optional
+future ostream
+future print
+future queue
 future ratio
+future sstream
+future stack
 future stdexcept
+future streambuf
 future string
+future string_view
 future system_error
 future thread
+future tuple
 future type_traits
 future typeinfo
+future unordered_map
+future utility
+future variant
+future vector
 future version
 initializer_list cstddef
+initializer_list version
+iomanip algorithm
+iomanip array
+iomanip atomic
+iomanip bit
+iomanip bitset
+iomanip cctype
+iomanip cerrno
+iomanip climits
+iomanip clocale
+iomanip cmath
+iomanip compare
+iomanip concepts
+iomanip cstdarg
+iomanip cstddef
+iomanip cstdint
+iomanip cstdio
+iomanip cstdlib
+iomanip cstring
+iomanip ctime
+iomanip cwchar
+iomanip cwctype
+iomanip deque
+iomanip exception
+iomanip format
+iomanip functional
+iomanip initializer_list
+iomanip ios
+iomanip iosfwd
 iomanip istream
+iomanip iterator
+iomanip limits
+iomanip locale
+iomanip memory
+iomanip mutex
+iomanip new
+iomanip optional
+iomanip ostream
+iomanip print
+iomanip queue
+iomanip ratio
+iomanip stack
+iomanip stdexcept
+iomanip streambuf
+iomanip string
+iomanip string_view
+iomanip system_error
+iomanip tuple
+iomanip type_traits
+iomanip typeinfo
+iomanip unordered_map
+iomanip utility
+iomanip variant
+iomanip vector
 iomanip version
+ios algorithm
 ios atomic
+ios bit
 ios cctype
 ios cerrno
+ios climits
 ios clocale
+ios cmath
+ios compare
 ios concepts
 ios cstddef
 ios cstdint
+ios cstdio
 ios cstdlib
 ios cstring
+ios ctime
 ios cwchar
+ios cwctype
+ios exception
 ios initializer_list
 ios iosfwd
+ios iterator
 ios limits
+ios memory
 ios mutex
 ios new
+ios optional
+ios ratio
 ios stdexcept
 ios string
+ios string_view
 ios system_error
+ios tuple
 ios type_traits
 ios typeinfo
+ios utility
+ios variant
 ios version
 iosfwd version
+iostream algorithm
+iostream array
+iostream atomic
+iostream bit
+iostream bitset
+iostream cctype
+iostream cerrno
+iostream climits
+iostream clocale
+iostream cmath
+iostream compare
+iostream concepts
+iostream cstdarg
+iostream cstddef
+iostream cstdint
+iostream cstdio
+iostream cstdlib
+iostream cstring
+iostream ctime
+iostream cwchar
+iostream cwctype
+iostream deque
+iostream exception
+iostream format
+iostream functional
+iostream initializer_list
 iostream ios
+iostream iosfwd
 iostream istream
+iostream iterator
+iostream limits
+iostream locale
+iostream memory
+iostream mutex
+iostream new
+iostream optional
 iostream ostream
+iostream print
+iostream queue
+iostream ratio
+iostream stack
+iostream stdexcept
 iostream streambuf
+iostream string
+iostream string_view
+iostream system_error
+iostream tuple
+iostream type_traits
+iostream typeinfo
+iostream unordered_map
+iostream utility
+iostream variant
+iostream vector
 iostream version
+istream algorithm
+istream array
+istream atomic
+istream bit
 istream bitset
+istream cctype
 istream cerrno
+istream climits
+istream clocale
+istream cmath
+istream compare
 istream concepts
+istream cstdarg
 istream cstddef
 istream cstdint
+istream cstdio
+istream cstdlib
 istream cstring
+istream ctime
+istream cwchar
+istream cwctype
+istream deque
+istream exception
+istream format
+istream functional
 istream initializer_list
 istream ios
 istream iosfwd
+istream iterator
 istream limits
 istream locale
+istream memory
+istream mutex
 istream new
+istream optional
 istream ostream
+istream print
+istream queue
+istream ratio
+istream stack
+istream stdexcept
 istream streambuf
 istream string
 istream string_view
+istream system_error
+istream tuple
 istream type_traits
 istream typeinfo
+istream unordered_map
+istream utility
+istream variant
+istream vector
 istream version
+iterator cmath
 iterator compare
 iterator concepts
 iterator cstddef
+iterator cstdint
 iterator cstdlib
+iterator cstring
 iterator exception
 iterator initializer_list
 iterator iosfwd...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/107911


More information about the libcxx-commits mailing list