diff options
author | Ignat Loskutov <ignat.loskutov@gmail.com> | 2018-10-31 20:23:21 +0300 |
---|---|---|
committer | Kim Grasman <kim.grasman@gmail.com> | 2018-12-08 15:03:01 +0100 |
commit | fdb276ce22936b2ec0f4357ca72e6badc52a5a5b (patch) | |
tree | fce4a194feecf50660b2c82e9d360e8846987f28 | |
parent | 596f25f5eb76187589d8ccaa71819fa196352de9 (diff) |
Update mappings
Add mappings from explicit `@headername` annotations and remove
private -> private mappings for which there's a private -> public one
-rw-r--r-- | gcc.stl.headers.imp | 218 | ||||
-rw-r--r-- | iwyu_include_picker.cc | 220 |
2 files changed, 294 insertions, 144 deletions
diff --git a/gcc.stl.headers.imp b/gcc.stl.headers.imp index e20dc50..4cf858e 100644 --- a/gcc.stl.headers.imp +++ b/gcc.stl.headers.imp @@ -1,80 +1,199 @@ # GCC STL headers [ - # ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && grep '^ *# *include' {ext/,tr1/,}* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@ { include: ["<$2>", private, "<$1>", public ] },@' | grep -e bits/ -e tr1_impl/ | sort -u) - # I removed a lot of 'meaningless' dependencies -- for instance, - # <functional> //includes <bits/stringfwd.h>, but if someone is - # using strings, <functional> isn't enough to satisfy iwyu. - # We may need to add other dirs in future versions of gcc. + # Headers explicitly annotated with `@headername` + # ( cd /usr/include/c++/8 && grep -r headername | perl -nle 'm/^([^:]+).*@headername\{([^,]*)\}/ && print qq@ { include: ["<$1>", private, "<$2>", public ] },@' | sort -u ) + { include: ["<backward/auto_ptr.h>", private, "<memory>", public ] }, + { include: ["<backward/backward_warning.h>", private, "<iosfwd>", public ] }, + { include: ["<backward/binders.h>", private, "<functional>", public ] }, { include: ["<bits/algorithmfwd.h>", private, "<algorithm>", public ] }, + { include: ["<bits/allocated_ptr.h>", private, "<memory>", public ] }, { include: ["<bits/allocator.h>", private, "<memory>", public ] }, - { include: ["<bits/atomic_word.h>", private, "<ext/atomicity.h>", public ] }, - { include: ["<bits/basic_file.h>", private, "<fstream>", public ] }, + { include: ["<bits/alloc_traits.h>", private, "<memory>", public ] }, + { include: ["<bits/atomic_base.h>", private, "<atomic>", public ] }, + { include: ["<bits/atomic_lockfree_defines.h>", private, "<atomic>", public ] }, { include: ["<bits/basic_ios.h>", private, "<ios>", public ] }, + { include: ["<bits/basic_ios.tcc>", private, "<ios>", public ] }, { include: ["<bits/basic_string.h>", private, "<string>", public ] }, { include: ["<bits/basic_string.tcc>", private, "<string>", public ] }, - { include: ["<bits/boost_sp_shared_count.h>", private, "<memory>", public ] }, - { include: ["<bits/c++io.h>", private, "<ext/stdio_sync_filebuf.h>", public ] }, - { include: ["<bits/c++config.h>", private, "<cstddef>", public ] }, + { include: ["<bits/boost_concept_check.h>", private, "<iterator>", public ] }, + { include: ["<bits/c++0x_warning.h>", private, "<iosfwd>", public ] }, { include: ["<bits/char_traits.h>", private, "<string>", public ] }, - { include: ["<bits/cmath.tcc>", private, "<cmath>", public ] }, - { include: ["<bits/codecvt.h>", private, "<fstream>", public ] }, - { include: ["<bits/cxxabi_tweaks.h>", private, "<cxxabi.h>", public ] }, + { include: ["<bits/codecvt.h>", private, "<locale>", public ] }, + { include: ["<bits/concept_check.h>", private, "<iterator>", public ] }, + { include: ["<bits/cpp_type_traits.h>", private, "<ext/type_traits>", public ] }, + { include: ["<bits/cxxabi_forced.h>", private, "<cxxabi.h>", public ] }, { include: ["<bits/deque.tcc>", private, "<deque>", public ] }, + { include: ["<bits/exception_defines.h>", private, "<exception>", public ] }, + { include: ["<bits/exception_ptr.h>", private, "<exception>", public ] }, + { include: ["<bits/forward_list.h>", private, "<forward_list>", public ] }, + { include: ["<bits/forward_list.tcc>", private, "<forward_list>", public ] }, + { include: ["<bits/fs_dir.h>", private, "<filesystem>", public ] }, + { include: ["<bits/fs_fwd.h>", private, "<filesystem>", public ] }, + { include: ["<bits/fs_ops.h>", private, "<filesystem>", public ] }, + { include: ["<bits/fs_path.h>", private, "<filesystem>", public ] }, { include: ["<bits/fstream.tcc>", private, "<fstream>", public ] }, - { include: ["<bits/functional_hash.h>", private, "<unordered_map>", public ] }, - { include: ["<bits/gslice.h>", private, "<valarray>", public ] }, + { include: ["<bits/functexcept.h>", private, "<exception>", public ] }, + { include: ["<bits/functional_hash.h>", private, "<functional>", public ] }, { include: ["<bits/gslice_array.h>", private, "<valarray>", public ] }, - { include: ["<bits/hashtable.h>", private, "<unordered_map>", public ] }, - { include: ["<bits/hashtable.h>", private, "<unordered_set>", public ] }, + { include: ["<bits/gslice.h>", private, "<valarray>", public ] }, + { include: ["<bits/hash_bytes.h>", private, "<functional>", public ] }, { include: ["<bits/indirect_array.h>", private, "<valarray>", public ] }, - { include: ["<bits/ios_base.h>", private, "<iostream>", public ] }, + { include: ["<bits/invoke.h>", private, "<functional>", public ] }, { include: ["<bits/ios_base.h>", private, "<ios>", public ] }, - { include: ["<bits/ios_base.h>", private, "<iomanip>", public ] }, + { include: ["<bits/istream.tcc>", private, "<istream>", public ] }, + { include: ["<bits/list.tcc>", private, "<list>", public ] }, { include: ["<bits/locale_classes.h>", private, "<locale>", public ] }, + { include: ["<bits/locale_classes.tcc>", private, "<locale>", public ] }, + { include: ["<bits/locale_conv.h>", private, "<locale>", public ] }, { include: ["<bits/locale_facets.h>", private, "<locale>", public ] }, { include: ["<bits/locale_facets_nonio.h>", private, "<locale>", public ] }, + { include: ["<bits/locale_facets_nonio.tcc>", private, "<locale>", public ] }, + { include: ["<bits/locale_facets.tcc>", private, "<locale>", public ] }, { include: ["<bits/localefwd.h>", private, "<locale>", public ] }, { include: ["<bits/mask_array.h>", private, "<valarray>", public ] }, - { include: ["<bits/ostream.tcc>", private, "<ostream>", public ] }, + { include: ["<bits/memoryfwd.h>", private, "<memory>", public ] }, + { include: ["<bits/move.h>", private, "<utility>", public ] }, + { include: ["<bits/nested_exception.h>", private, "<exception>", public ] }, { include: ["<bits/ostream_insert.h>", private, "<ostream>", public ] }, - { include: ["<bits/postypes.h>", private, "<iostream>", public ] }, + { include: ["<bits/ostream.tcc>", private, "<ostream>", public ] }, + { include: ["<bits/parse_numbers.h>", private, "<chrono>", public ] }, + { include: ["<bits/postypes.h>", private, "<iosfwd>", public ] }, + { include: ["<bits/predefined_ops.h>", private, "<algorithm>", public ] }, + { include: ["<bits/ptr_traits.h>", private, "<memory>", public ] }, + { include: ["<bits/quoted_string.h>", private, "<iomanip>", public ] }, + { include: ["<bits/random.h>", private, "<random>", public ] }, + { include: ["<bits/random.tcc>", private, "<random>", public ] }, + { include: ["<bits/range_access.h>", private, "<iterator>", public ] }, + { include: ["<bits/refwrap.h>", private, "<functional>", public ] }, + { include: ["<bits/regex_automaton.h>", private, "<regex>", public ] }, + { include: ["<bits/regex_automaton.tcc>", private, "<regex>", public ] }, + { include: ["<bits/regex_compiler.h>", private, "<regex>", public ] }, + { include: ["<bits/regex_compiler.tcc>", private, "<regex>", public ] }, + { include: ["<bits/regex_constants.h>", private, "<regex>", public ] }, + { include: ["<bits/regex_error.h>", private, "<regex>", public ] }, + { include: ["<bits/regex_executor.h>", private, "<regex>", public ] }, + { include: ["<bits/regex_executor.tcc>", private, "<regex>", public ] }, + { include: ["<bits/regex.h>", private, "<regex>", public ] }, + { include: ["<bits/regex_scanner.h>", private, "<regex>", public ] }, + { include: ["<bits/regex_scanner.tcc>", private, "<regex>", public ] }, + { include: ["<bits/regex.tcc>", private, "<regex>", public ] }, + { include: ["<bits/shared_ptr_atomic.h>", private, "<memory>", public ] }, + { include: ["<bits/shared_ptr_base.h>", private, "<memory>", public ] }, + { include: ["<bits/shared_ptr.h>", private, "<memory>", public ] }, { include: ["<bits/slice_array.h>", private, "<valarray>", public ] }, + { include: ["<bits/specfun.h>", private, "<cmath>", public ] }, + { include: ["<bits/sstream.tcc>", private, "<sstream>", public ] }, { include: ["<bits/std_function.h>", private, "<functional>", public ] }, - { include: ["<bits/stl_algo.h>", private, "<algorithm>", public ] }, + { include: ["<bits/std_mutex.h>", private, "<mutex>", public ] }, { include: ["<bits/stl_algobase.h>", private, "<algorithm>", public ] }, + { include: ["<bits/stl_algo.h>", private, "<algorithm>", public ] }, { include: ["<bits/stl_bvector.h>", private, "<vector>", public ] }, { include: ["<bits/stl_construct.h>", private, "<memory>", public ] }, { include: ["<bits/stl_deque.h>", private, "<deque>", public ] }, { include: ["<bits/stl_function.h>", private, "<functional>", public ] }, { include: ["<bits/stl_heap.h>", private, "<queue>", public ] }, - { include: ["<bits/stl_iterator.h>", private, "<iterator>", public ] }, { include: ["<bits/stl_iterator_base_funcs.h>", private, "<iterator>", public ] }, { include: ["<bits/stl_iterator_base_types.h>", private, "<iterator>", public ] }, + { include: ["<bits/stl_iterator.h>", private, "<iterator>", public ] }, { include: ["<bits/stl_list.h>", private, "<list>", public ] }, { include: ["<bits/stl_map.h>", private, "<map>", public ] }, { include: ["<bits/stl_multimap.h>", private, "<map>", public ] }, { include: ["<bits/stl_multiset.h>", private, "<set>", public ] }, { include: ["<bits/stl_numeric.h>", private, "<numeric>", public ] }, { include: ["<bits/stl_pair.h>", private, "<utility>", public ] }, - { include: ["<bits/stl_pair.h>", private, "<tr1/utility>", public ] }, { include: ["<bits/stl_queue.h>", private, "<queue>", public ] }, { include: ["<bits/stl_raw_storage_iter.h>", private, "<memory>", public ] }, { include: ["<bits/stl_relops.h>", private, "<utility>", public ] }, { include: ["<bits/stl_set.h>", private, "<set>", public ] }, { include: ["<bits/stl_stack.h>", private, "<stack>", public ] }, { include: ["<bits/stl_tempbuf.h>", private, "<memory>", public ] }, - { include: ["<bits/stl_tree.h>", private, "<map>", public ] }, - { include: ["<bits/stl_tree.h>", private, "<set>", public ] }, { include: ["<bits/stl_uninitialized.h>", private, "<memory>", public ] }, { include: ["<bits/stl_vector.h>", private, "<vector>", public ] }, - { include: ["<bits/stream_iterator.h>", private, "<iterator>", public ] }, - { include: ["<bits/streambuf.tcc>", private, "<streambuf>", public ] }, { include: ["<bits/streambuf_iterator.h>", private, "<iterator>", public ] }, + { include: ["<bits/streambuf.tcc>", private, "<streambuf>", public ] }, + { include: ["<bits/stream_iterator.h>", private, "<iterator>", public ] }, { include: ["<bits/stringfwd.h>", private, "<string>", public ] }, + { include: ["<bits/string_view.tcc>", private, "<string_view>", public ] }, + { include: ["<bits/uniform_int_dist.h>", private, "<random>", public ] }, + { include: ["<bits/unique_ptr.h>", private, "<memory>", public ] }, + { include: ["<bits/unordered_map.h>", private, "<unordered_map>", public ] }, + { include: ["<bits/unordered_set.h>", private, "<unordered_set>", public ] }, { include: ["<bits/valarray_after.h>", private, "<valarray>", public ] }, { include: ["<bits/valarray_array.h>", private, "<valarray>", public ] }, + { include: ["<bits/valarray_array.tcc>", private, "<valarray>", public ] }, { include: ["<bits/valarray_before.h>", private, "<valarray>", public ] }, { include: ["<bits/vector.tcc>", private, "<vector>", public ] }, + { include: ["<decimal/decimal.h>", private, "<decimal>", public ] }, + { include: ["<experimental/bits/fs_dir.h>", private, "<experimental/filesystem>", public ] }, + { include: ["<experimental/bits/fs_fwd.h>", private, "<experimental/filesystem>", public ] }, + { include: ["<experimental/bits/fs_ops.h>", private, "<experimental/filesystem>", public ] }, + { include: ["<experimental/bits/fs_path.h>", private, "<experimental/filesystem>", public ] }, + { include: ["<experimental/bits/shared_ptr.h>", private, "<experimental/memory>", public ] }, + { include: ["<experimental/bits/string_view.tcc>", private, "<experimental/string_view>", public ] }, + { include: ["<ext/cast.h>", private, "<ext/pointer.h>", public ] }, + { include: ["<ext/random.tcc>", private, "<ext/random>", public ] }, + { include: ["<ext/rc_string_base.h>", private, "<ext/vstring.h>", public ] }, + { include: ["<ext/ropeimpl.h>", private, "<ext/rope>", public ] }, + { include: ["<ext/sso_string_base.h>", private, "<ext/vstring.h>", public ] }, + { include: ["<ext/vstring_fwd.h>", private, "<ext/vstring.h>", public ] }, + { include: ["<ext/vstring.tcc>", private, "<ext/vstring.h>", public ] }, + { include: ["<ext/vstring_util.h>", private, "<ext/vstring.h>", public ] }, + { include: ["<tr1/bessel_function.tcc>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/beta_function.tcc>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/ell_integral.tcc>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/exp_integral.tcc>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/functional_hash.h>", private, "<tr1/functional>", public ] }, + { include: ["<tr1/gamma.tcc>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/hypergeometric.tcc>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/legendre_function.tcc>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/modified_bessel_func.tcc>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/poly_hermite.tcc>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/poly_laguerre.tcc>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/random.h>", private, "<tr1/random>", public ] }, + { include: ["<tr1/random.tcc>", private, "<tr1/random>", public ] }, + { include: ["<tr1/riemann_zeta.tcc>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/shared_ptr.h>", private, "<tr1/memory>", public ] }, + { include: ["<tr1/special_function_util.h>", private, "<tr1/cmath>", public ] }, + { include: ["<tr1/unordered_map.h>", private, "<tr1/unordered_map>", public ] }, + { include: ["<tr1/unordered_set.h>", private, "<tr1/unordered_set>", public ] }, + { include: ["<tr2/dynamic_bitset.tcc>", private, "<tr2/dynamic_bitset>", public ] }, + # ( cd /usr/include/x86_64-linux-gnu/c++/8 && grep -r headername | perl -nle 'm/^([^:]+).*@headername\{([^,]*)\}/ && print qq@ { include: ["<$1>", private, "<$2>", public ] },@' | sort -u ) + { include: ["<bits/basic_file.h>", private, "<ios>", public ] }, + { include: ["<bits/c++allocator.h>", private, "<memory>", public ] }, + { include: ["<bits/c++config.h>", private, "<iosfwd>", public ] }, + { include: ["<bits/c++io.h>", private, "<ios>", public ] }, + { include: ["<bits/c++locale.h>", private, "<locale>", public ] }, + { include: ["<bits/cpu_defines.h>", private, "<iosfwd>", public ] }, + { include: ["<bits/ctype_base.h>", private, "<locale>", public ] }, + { include: ["<bits/ctype_inline.h>", private, "<locale>", public ] }, + { include: ["<bits/error_constants.h>", private, "<system_error>", public ] }, + { include: ["<bits/messages_members.h>", private, "<locale>", public ] }, + { include: ["<bits/opt_random.h>", private, "<random>", public ] }, + { include: ["<bits/os_defines.h>", private, "<iosfwd>", public ] }, + { include: ["<bits/time_members.h>", private, "<locale>", public ] }, + { include: ["<ext/opt_random.h>", private, "<ext/random>", public ] }, + # ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && grep '^ *# *include' {ext/,tr1/,}* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@ { include: ["<$2>", private, "<$1>", public ] },@' | grep -e bits/ -e tr1_impl/ | sort -u) + # I removed a lot of 'meaningless' dependencies -- for instance, + # <functional> //includes <bits/stringfwd.h>, but if someone is + # using strings, <functional> isn't enough to satisfy iwyu. + # We may need to add other dirs in future versions of gcc. + { include: ["<bits/atomic_word.h>", private, "<ext/atomicity.h>", public ] }, + { include: ["<bits/basic_file.h>", private, "<fstream>", public ] }, + { include: ["<bits/boost_sp_shared_count.h>", private, "<memory>", public ] }, + { include: ["<bits/c++io.h>", private, "<ext/stdio_sync_filebuf.h>", public ] }, + { include: ["<bits/c++config.h>", private, "<cstddef>", public ] }, + { include: ["<bits/cmath.tcc>", private, "<cmath>", public ] }, + { include: ["<bits/codecvt.h>", private, "<fstream>", public ] }, + { include: ["<bits/cxxabi_tweaks.h>", private, "<cxxabi.h>", public ] }, + { include: ["<bits/functional_hash.h>", private, "<unordered_map>", public ] }, + { include: ["<bits/hashtable.h>", private, "<unordered_map>", public ] }, + { include: ["<bits/hashtable.h>", private, "<unordered_set>", public ] }, + { include: ["<bits/ios_base.h>", private, "<iostream>", public ] }, + { include: ["<bits/ios_base.h>", private, "<iomanip>", public ] }, + { include: ["<bits/postypes.h>", private, "<iostream>", public ] }, + { include: ["<bits/stl_pair.h>", private, "<tr1/utility>", public ] }, + { include: ["<bits/stl_tree.h>", private, "<map>", public ] }, + { include: ["<bits/stl_tree.h>", private, "<set>", public ] }, { include: ["<tr1_impl/array>", private, "<array>", public ] }, { include: ["<tr1_impl/array>", private, "<tr1/array>", public ] }, { include: ["<tr1_impl/boost_shared_ptr.h>", private, "<memory>", public ] }, @@ -115,12 +234,10 @@ { include: ["<tr1_impl/unordered_set>", private, "<unordered_set>", public ] }, { include: ["<tr1_impl/utility>", private, "<tr1/utility>", public ] }, { include: ["<tr1_impl/utility>", private, "<utility>", public ] }, - { include: ["<bits/move.h>", private, "<utility>", public ] }, # Hash and hashtable-based containers. { include: ["<tr1_impl/functional_hash.h>", private, "<tr1/functional>", public ] }, { include: ["<tr1_impl/functional_hash.h>", private, "<tr1/unordered_map>", public ] }, { include: ["<tr1_impl/functional_hash.h>", private, "<tr1/unordered_set>", public ] }, - { include: ["<tr1/functional_hash.h>", private, "<tr1/functional>", public ] }, { include: ["<tr1/functional_hash.h>", private, "<tr1/unordered_map>", public ] }, { include: ["<tr1/functional_hash.h>", private, "<tr1/unordered_set>", public ] }, { include: ["<tr1_impl/hashtable>", private, "<tr1/unordered_map>", public ] }, @@ -130,63 +247,23 @@ # All .tcc files are gcc internal-include files. We get them from # ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && grep -R '^ *# *include.*tcc' * | perl -nle 'm/^([^:]+).*[<"]([^>"]+)[>"]/ && print qq@ { include: ["<$2>", private, "<$1>", public ] },@' | sort ) # I had to manually edit some of the entries to say the map-to is private. - { include: ["<bits/basic_ios.tcc>", private, "<bits/basic_ios.h>", private ] }, - { include: ["<bits/basic_string.tcc>", private, "<string>", public ] }, { include: ["<bits/cmath.tcc>", private, "<cmath>", public ] }, - { include: ["<bits/deque.tcc>", private, "<deque>", public ] }, - { include: ["<bits/fstream.tcc>", private, "<fstream>", public ] }, - { include: ["<bits/istream.tcc>", private, "<istream>", public ] }, - { include: ["<bits/list.tcc>", private, "<list>", public ] }, - { include: ["<bits/locale_classes.tcc>", private, "<bits/locale_classes.h>", private ] }, - { include: ["<bits/locale_facets.tcc>", private, "<bits/locale_facets.h>", private ] }, - { include: ["<bits/locale_facets_nonio.tcc>", private, - "<bits/locale_facets_nonio.h>", private ] }, - { include: ["<bits/ostream.tcc>", private, "<ostream>", public ] }, - { include: ["<bits/sstream.tcc>", private, "<sstream>", public ] }, - { include: ["<bits/streambuf.tcc>", private, "<streambuf>", public ] }, - { include: ["<bits/valarray_array.tcc>", private, "<bits/valarray_array.h>", private ] }, - { include: ["<bits/vector.tcc>", private, "<vector>", public ] }, { include: ["<debug/safe_iterator.tcc>", private, "<debug/safe_iterator.h>", public ] }, - { include: ["<tr1/bessel_function.tcc>", private, "<tr1/cmath>", public ] }, - { include: ["<tr1/beta_function.tcc>", private, "<tr1/cmath>", public ] }, - { include: ["<tr1/ell_integral.tcc>", private, "<tr1/cmath>", public ] }, - { include: ["<tr1/exp_integral.tcc>", private, "<tr1/cmath>", public ] }, - { include: ["<tr1/gamma.tcc>", private, "<tr1/cmath>", public ] }, - { include: ["<tr1/hypergeometric.tcc>", private, "<tr1/cmath>", public ] }, - { include: ["<tr1/legendre_function.tcc>", private, "<tr1/cmath>", public ] }, - { include: ["<tr1/modified_bessel_func.tcc>", private, "<tr1/cmath>", public ] }, - { include: ["<tr1/poly_hermite.tcc>", private, "<tr1/cmath>", public ] }, - { include: ["<tr1/poly_laguerre.tcc>", private, "<tr1/cmath>", public ] }, - { include: ["<tr1/riemann_zeta.tcc>", private, "<tr1/cmath>", public ] }, { include: ["<tr1_impl/random.tcc>", private, "<tr1_impl/random>", private ] }, # Some bits->bits //includes: A few files in bits re-export # symbols from other files in bits. # ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && grep '^ *# *include.*bits/' bits/* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@ { include: ["<$2>", private, "<$1>", private ] },@' | grep bits/ | sort -u) # and carefully picked reasonable-looking results (algorithm # *uses* pair but doesn't *re-export* pair, for instance). - { include: ["<bits/boost_concept_check.h>", private, - "<bits/concept_check.h>", private ] }, { include: ["<bits/c++allocator.h>", private, "<bits/allocator.h>", private ] }, - { include: ["<bits/codecvt.h>", private, "<bits/locale_facets_nonio.h>", private ] }, { include: ["<bits/ctype_base.h>", private, "<bits/locale_facets.h>", private ] }, { include: ["<bits/ctype_inline.h>", private, "<bits/locale_facets.h>", private ] }, - { include: ["<bits/functexcept.h>", private, "<bits/stl_algobase.h>", private ] }, - { include: ["<bits/locale_classes.h>", private, "<bits/basic_ios.h>", private ] }, - { include: ["<bits/locale_facets.h>", private, "<bits/basic_ios.h>", private ] }, { include: ["<bits/messages_members.h>", private, "<bits/locale_facets_nonio.h>", private ] }, - { include: ["<bits/postypes.h>", private, "<bits/char_traits.h>", private ] }, - { include: ["<bits/slice_array.h>", private, "<bits/valarray_before.h>", private ] }, - { include: ["<bits/stl_construct.h>", private, "<bits/stl_tempbuf.h>", private ] }, { include: ["<bits/stl_move.h>", private, "<bits/stl_algobase.h>", private ] }, - { include: ["<bits/stl_uninitialized.h>", private, "<bits/stl_tempbuf.h>", private ] }, - { include: ["<bits/stl_vector.h>", private, "<bits/stl_bvector.h>", private ] }, - { include: ["<bits/streambuf_iterator.h>", private, "<bits/basic_ios.h>", private ] }, # I don't think we want to be having people move to 'backward/' # yet. (These hold deprecated STL classes that we still use # actively.) These are the ones that turned up in an analysis of - { include: ["<backward/auto_ptr.h>", private, "<memory>", public ] }, - { include: ["<backward/binders.h>", private, "<functional>", public ] }, { include: ["<backward/hash_fun.h>", private, "<hash_map>", public ] }, { include: ["<backward/hash_fun.h>", private, "<hash_set>", public ] }, { include: ["<backward/hashtable.h>", private, "<hash_map>", public ] }, @@ -222,6 +299,5 @@ { include: ["<streambuf>", public, "<ios>", public ] }, # The location of exception_defines.h varies by GCC version. It should # never be included directly. - { include: ["<bits/exception_defines.h>", private, "<exception>", public ] }, { include: ["<exception_defines.h>", private, "<exception>", public ] }, ] diff --git a/iwyu_include_picker.cc b/iwyu_include_picker.cc index 0042037..be318e2 100644 --- a/iwyu_include_picker.cc +++ b/iwyu_include_picker.cc @@ -549,81 +549,200 @@ const char* stdlib_cpp_public_headers[] = { // Private -> public include mappings for GNU libstdc++ const IncludeMapEntry libstdcpp_include_map[] = { - // ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && grep '^ *# *include' {ext/,tr1/,}* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@ { "<$2>", kPrivate, "<$1>", kPublic },@' | grep -e bits/ -e tr1_impl/ | sort -u) - // I removed a lot of 'meaningless' dependencies -- for instance, - // <functional> #includes <bits/stringfwd.h>, but if someone is - // using strings, <functional> isn't enough to satisfy iwyu. - // We may need to add other dirs in future versions of gcc. + // cd /usr/include/c++/8 && grep -r headername | perl -nle 'm/^([^:]+).*@headername\{([^,]*)\}/ && print qq@ { "<$1>", kPrivate, "<$2>", kPublic },@' | sort -u + { "<backward/auto_ptr.h>", kPrivate, "<memory>", kPublic }, + { "<backward/backward_warning.h>", kPrivate, "<iosfwd>", kPublic }, + { "<backward/binders.h>", kPrivate, "<functional>", kPublic }, { "<bits/algorithmfwd.h>", kPrivate, "<algorithm>", kPublic }, + { "<bits/allocated_ptr.h>", kPrivate, "<memory>", kPublic }, { "<bits/allocator.h>", kPrivate, "<memory>", kPublic }, - { "<bits/atomic_word.h>", kPrivate, "<ext/atomicity.h>", kPublic }, - { "<bits/basic_file.h>", kPrivate, "<fstream>", kPublic }, + { "<bits/alloc_traits.h>", kPrivate, "<memory>", kPublic }, + { "<bits/atomic_base.h>", kPrivate, "<atomic>", kPublic }, + { "<bits/atomic_lockfree_defines.h>", kPrivate, "<atomic>", kPublic }, { "<bits/basic_ios.h>", kPrivate, "<ios>", kPublic }, + { "<bits/basic_ios.tcc>", kPrivate, "<ios>", kPublic }, { "<bits/basic_string.h>", kPrivate, "<string>", kPublic }, { "<bits/basic_string.tcc>", kPrivate, "<string>", kPublic }, - { "<bits/boost_sp_shared_count.h>", kPrivate, "<memory>", kPublic }, - { "<bits/c++io.h>", kPrivate, "<ext/stdio_sync_filebuf.h>", kPublic }, - { "<bits/c++config.h>", kPrivate, "<cstddef>", kPublic }, + { "<bits/boost_concept_check.h>", kPrivate, "<iterator>", kPublic }, + { "<bits/c++0x_warning.h>", kPrivate, "<iosfwd>", kPublic }, { "<bits/char_traits.h>", kPrivate, "<string>", kPublic }, - { "<bits/cmath.tcc>", kPrivate, "<cmath>", kPublic }, - { "<bits/codecvt.h>", kPrivate, "<fstream>", kPublic }, - { "<bits/cxxabi_tweaks.h>", kPrivate, "<cxxabi.h>", kPublic }, + { "<bits/codecvt.h>", kPrivate, "<locale>", kPublic }, + { "<bits/concept_check.h>", kPrivate, "<iterator>", kPublic }, + { "<bits/cpp_type_traits.h>", kPrivate, "<ext/type_traits>", kPublic }, + { "<bits/cxxabi_forced.h>", kPrivate, "<cxxabi.h>", kPublic }, { "<bits/deque.tcc>", kPrivate, "<deque>", kPublic }, + { "<bits/exception_defines.h>", kPrivate, "<exception>", kPublic }, + { "<bits/exception_ptr.h>", kPrivate, "<exception>", kPublic }, + { "<bits/forward_list.h>", kPrivate, "<forward_list>", kPublic }, + { "<bits/forward_list.tcc>", kPrivate, "<forward_list>", kPublic }, + { "<bits/fs_dir.h>", kPrivate, "<filesystem>", kPublic }, + { "<bits/fs_fwd.h>", kPrivate, "<filesystem>", kPublic }, + { "<bits/fs_ops.h>", kPrivate, "<filesystem>", kPublic }, + { "<bits/fs_path.h>", kPrivate, "<filesystem>", kPublic }, { "<bits/fstream.tcc>", kPrivate, "<fstream>", kPublic }, - { "<bits/functional_hash.h>", kPrivate, "<unordered_map>", kPublic }, - { "<bits/gslice.h>", kPrivate, "<valarray>", kPublic }, + { "<bits/functexcept.h>", kPrivate, "<exception>", kPublic }, + { "<bits/functional_hash.h>", kPrivate, "<functional>", kPublic }, { "<bits/gslice_array.h>", kPrivate, "<valarray>", kPublic }, - { "<bits/hashtable.h>", kPrivate, "<unordered_map>", kPublic }, - { "<bits/hashtable.h>", kPrivate, "<unordered_set>", kPublic }, + { "<bits/gslice.h>", kPrivate, "<valarray>", kPublic }, + { "<bits/hash_bytes.h>", kPrivate, "<functional>", kPublic }, { "<bits/indirect_array.h>", kPrivate, "<valarray>", kPublic }, - { "<bits/ios_base.h>", kPrivate, "<iostream>", kPublic }, + { "<bits/invoke.h>", kPrivate, "<functional>", kPublic }, { "<bits/ios_base.h>", kPrivate, "<ios>", kPublic }, - { "<bits/ios_base.h>", kPrivate, "<iomanip>", kPublic }, + { "<bits/istream.tcc>", kPrivate, "<istream>", kPublic }, + { "<bits/list.tcc>", kPrivate, "<list>", kPublic }, { "<bits/locale_classes.h>", kPrivate, "<locale>", kPublic }, + { "<bits/locale_classes.tcc>", kPrivate, "<locale>", kPublic }, + { "<bits/locale_conv.h>", kPrivate, "<locale>", kPublic }, { "<bits/locale_facets.h>", kPrivate, "<locale>", kPublic }, { "<bits/locale_facets_nonio.h>", kPrivate, "<locale>", kPublic }, + { "<bits/locale_facets_nonio.tcc>", kPrivate, "<locale>", kPublic }, + { "<bits/locale_facets.tcc>", kPrivate, "<locale>", kPublic }, { "<bits/localefwd.h>", kPrivate, "<locale>", kPublic }, { "<bits/mask_array.h>", kPrivate, "<valarray>", kPublic }, - { "<bits/ostream.tcc>", kPrivate, "<ostream>", kPublic }, + { "<bits/memoryfwd.h>", kPrivate, "<memory>", kPublic }, + { "<bits/move.h>", kPrivate, "<utility>", kPublic }, + { "<bits/nested_exception.h>", kPrivate, "<exception>", kPublic }, { "<bits/ostream_insert.h>", kPrivate, "<ostream>", kPublic }, - { "<bits/postypes.h>", kPrivate, "<iostream>", kPublic }, + { "<bits/ostream.tcc>", kPrivate, "<ostream>", kPublic }, + { "<bits/parse_numbers.h>", kPrivate, "<chrono>", kPublic }, + { "<bits/postypes.h>", kPrivate, "<iosfwd>", kPublic }, + { "<bits/predefined_ops.h>", kPrivate, "<algorithm>", kPublic }, + { "<bits/ptr_traits.h>", kPrivate, "<memory>", kPublic }, + { "<bits/quoted_string.h>", kPrivate, "<iomanip>", kPublic }, + { "<bits/random.h>", kPrivate, "<random>", kPublic }, + { "<bits/random.tcc>", kPrivate, "<random>", kPublic }, + { "<bits/range_access.h>", kPrivate, "<iterator>", kPublic }, + { "<bits/refwrap.h>", kPrivate, "<functional>", kPublic }, + { "<bits/regex_automaton.h>", kPrivate, "<regex>", kPublic }, + { "<bits/regex_automaton.tcc>", kPrivate, "<regex>", kPublic }, + { "<bits/regex_compiler.h>", kPrivate, "<regex>", kPublic }, + { "<bits/regex_compiler.tcc>", kPrivate, "<regex>", kPublic }, + { "<bits/regex_constants.h>", kPrivate, "<regex>", kPublic }, + { "<bits/regex_error.h>", kPrivate, "<regex>", kPublic }, + { "<bits/regex_executor.h>", kPrivate, "<regex>", kPublic }, + { "<bits/regex_executor.tcc>", kPrivate, "<regex>", kPublic }, + { "<bits/regex.h>", kPrivate, "<regex>", kPublic }, + { "<bits/regex_scanner.h>", kPrivate, "<regex>", kPublic }, + { "<bits/regex_scanner.tcc>", kPrivate, "<regex>", kPublic }, + { "<bits/regex.tcc>", kPrivate, "<regex>", kPublic }, + { "<bits/shared_ptr_atomic.h>", kPrivate, "<memory>", kPublic }, + { "<bits/shared_ptr_base.h>", kPrivate, "<memory>", kPublic }, + { "<bits/shared_ptr.h>", kPrivate, "<memory>", kPublic }, { "<bits/slice_array.h>", kPrivate, "<valarray>", kPublic }, + { "<bits/specfun.h>", kPrivate, "<cmath>", kPublic }, + { "<bits/sstream.tcc>", kPrivate, "<sstream>", kPublic }, { "<bits/std_function.h>", kPrivate, "<functional>", kPublic }, - { "<bits/stl_algo.h>", kPrivate, "<algorithm>", kPublic }, + { "<bits/std_mutex.h>", kPrivate, "<mutex>", kPublic }, { "<bits/stl_algobase.h>", kPrivate, "<algorithm>", kPublic }, + { "<bits/stl_algo.h>", kPrivate, "<algorithm>", kPublic }, { "<bits/stl_bvector.h>", kPrivate, "<vector>", kPublic }, { "<bits/stl_construct.h>", kPrivate, "<memory>", kPublic }, { "<bits/stl_deque.h>", kPrivate, "<deque>", kPublic }, { "<bits/stl_function.h>", kPrivate, "<functional>", kPublic }, { "<bits/stl_heap.h>", kPrivate, "<queue>", kPublic }, - { "<bits/stl_iterator.h>", kPrivate, "<iterator>", kPublic }, { "<bits/stl_iterator_base_funcs.h>", kPrivate, "<iterator>", kPublic }, { "<bits/stl_iterator_base_types.h>", kPrivate, "<iterator>", kPublic }, + { "<bits/stl_iterator.h>", kPrivate, "<iterator>", kPublic }, { "<bits/stl_list.h>", kPrivate, "<list>", kPublic }, { "<bits/stl_map.h>", kPrivate, "<map>", kPublic }, { "<bits/stl_multimap.h>", kPrivate, "<map>", kPublic }, { "<bits/stl_multiset.h>", kPrivate, "<set>", kPublic }, { "<bits/stl_numeric.h>", kPrivate, "<numeric>", kPublic }, { "<bits/stl_pair.h>", kPrivate, "<utility>", kPublic }, - { "<bits/stl_pair.h>", kPrivate, "<tr1/utility>", kPublic }, { "<bits/stl_queue.h>", kPrivate, "<queue>", kPublic }, { "<bits/stl_raw_storage_iter.h>", kPrivate, "<memory>", kPublic }, { "<bits/stl_relops.h>", kPrivate, "<utility>", kPublic }, { "<bits/stl_set.h>", kPrivate, "<set>", kPublic }, { "<bits/stl_stack.h>", kPrivate, "<stack>", kPublic }, { "<bits/stl_tempbuf.h>", kPrivate, "<memory>", kPublic }, - { "<bits/stl_tree.h>", kPrivate, "<map>", kPublic }, - { "<bits/stl_tree.h>", kPrivate, "<set>", kPublic }, { "<bits/stl_uninitialized.h>", kPrivate, "<memory>", kPublic }, { "<bits/stl_vector.h>", kPrivate, "<vector>", kPublic }, - { "<bits/stream_iterator.h>", kPrivate, "<iterator>", kPublic }, - { "<bits/streambuf.tcc>", kPrivate, "<streambuf>", kPublic }, { "<bits/streambuf_iterator.h>", kPrivate, "<iterator>", kPublic }, + { "<bits/streambuf.tcc>", kPrivate, "<streambuf>", kPublic }, + { "<bits/stream_iterator.h>", kPrivate, "<iterator>", kPublic }, { "<bits/stringfwd.h>", kPrivate, "<string>", kPublic }, + { "<bits/string_view.tcc>", kPrivate, "<string_view>", kPublic }, + { "<bits/uniform_int_dist.h>", kPrivate, "<random>", kPublic }, + { "<bits/unique_ptr.h>", kPrivate, "<memory>", kPublic }, + { "<bits/unordered_map.h>", kPrivate, "<unordered_map>", kPublic }, + { "<bits/unordered_set.h>", kPrivate, "<unordered_set>", kPublic }, { "<bits/valarray_after.h>", kPrivate, "<valarray>", kPublic }, { "<bits/valarray_array.h>", kPrivate, "<valarray>", kPublic }, + { "<bits/valarray_array.tcc>", kPrivate, "<valarray>", kPublic }, { "<bits/valarray_before.h>", kPrivate, "<valarray>", kPublic }, { "<bits/vector.tcc>", kPrivate, "<vector>", kPublic }, + { "<decimal/decimal.h>", kPrivate, "<decimal>", kPublic }, + { "<experimental/bits/fs_dir.h>", kPrivate, "<experimental/filesystem>", kPublic }, + { "<experimental/bits/fs_fwd.h>", kPrivate, "<experimental/filesystem>", kPublic }, + { "<experimental/bits/fs_ops.h>", kPrivate, "<experimental/filesystem>", kPublic }, + { "<experimental/bits/fs_path.h>", kPrivate, "<experimental/filesystem>", kPublic }, + { "<experimental/bits/shared_ptr.h>", kPrivate, "<experimental/memory>", kPublic }, + { "<experimental/bits/string_view.tcc>", kPrivate, "<experimental/string_view>", kPublic }, + { "<ext/cast.h>", kPrivate, "<ext/pointer.h>", kPublic }, + { "<ext/random.tcc>", kPrivate, "<ext/random>", kPublic }, + { "<ext/rc_string_base.h>", kPrivate, "<ext/vstring.h>", kPublic }, + { "<ext/ropeimpl.h>", kPrivate, "<ext/rope>", kPublic }, + { "<ext/sso_string_base.h>", kPrivate, "<ext/vstring.h>", kPublic }, + { "<ext/vstring_fwd.h>", kPrivate, "<ext/vstring.h>", kPublic }, + { "<ext/vstring.tcc>", kPrivate, "<ext/vstring.h>", kPublic }, + { "<ext/vstring_util.h>", kPrivate, "<ext/vstring.h>", kPublic }, + { "<tr1/bessel_function.tcc>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/beta_function.tcc>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/ell_integral.tcc>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/exp_integral.tcc>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/functional_hash.h>", kPrivate, "<tr1/functional>", kPublic }, + { "<tr1/gamma.tcc>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/hypergeometric.tcc>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/legendre_function.tcc>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/modified_bessel_func.tcc>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/poly_hermite.tcc>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/poly_laguerre.tcc>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/random.h>", kPrivate, "<tr1/random>", kPublic }, + { "<tr1/random.tcc>", kPrivate, "<tr1/random>", kPublic }, + { "<tr1/riemann_zeta.tcc>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/shared_ptr.h>", kPrivate, "<tr1/memory>", kPublic }, + { "<tr1/special_function_util.h>", kPrivate, "<tr1/cmath>", kPublic }, + { "<tr1/unordered_map.h>", kPrivate, "<tr1/unordered_map>", kPublic }, + { "<tr1/unordered_set.h>", kPrivate, "<tr1/unordered_set>", kPublic }, + { "<tr2/dynamic_bitset.tcc>", kPrivate, "<tr2/dynamic_bitset>", kPublic }, + // cd /usr/include/x86_64-linux-gnu/c++/8 && grep -r headername | perl -nle 'm/^([^:]+).*@headername\{([^,]*)\}/ && print qq@ { "<$1>", kPrivate, "<$2>", kPublic },@' | sort -u + { "<bits/basic_file.h>", kPrivate, "<ios>", kPublic }, + { "<bits/c++allocator.h>", kPrivate, "<memory>", kPublic }, + { "<bits/c++config.h>", kPrivate, "<iosfwd>", kPublic }, + { "<bits/c++io.h>", kPrivate, "<ios>", kPublic }, + { "<bits/c++locale.h>", kPrivate, "<locale>", kPublic }, + { "<bits/cpu_defines.h>", kPrivate, "<iosfwd>", kPublic }, + { "<bits/ctype_base.h>", kPrivate, "<locale>", kPublic }, + { "<bits/ctype_inline.h>", kPrivate, "<locale>", kPublic }, + { "<bits/cxxabi_tweaks.h>", kPrivate, "<cxxabi.h>", kPublic }, + { "<bits/error_constants.h>", kPrivate, "<system_error>", kPublic }, + { "<bits/messages_members.h>", kPrivate, "<locale>", kPublic }, + { "<bits/opt_random.h>", kPrivate, "<random>", kPublic }, + { "<bits/os_defines.h>", kPrivate, "<iosfwd>", kPublic }, + { "<bits/time_members.h>", kPrivate, "<locale>", kPublic }, + { "<ext/opt_random.h>", kPrivate, "<ext/random>", kPublic }, + // ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && grep '^ *# *include' {ext/,tr1/,}* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@ { "<$2>", kPrivate, "<$1>", kPublic },@' | grep -e bits/ -e tr1_impl/ | sort -u) + // I removed a lot of 'meaningless' dependencies -- for instance, + // <functional> #includes <bits/stringfwd.h>, but if someone is + // using strings, <functional> isn't enough to satisfy iwyu. + // We may need to add other dirs in future versions of gcc. + { "<bits/atomic_word.h>", kPrivate, "<ext/atomicity.h>", kPublic }, + { "<bits/basic_file.h>", kPrivate, "<fstream>", kPublic }, + { "<bits/boost_sp_shared_count.h>", kPrivate, "<memory>", kPublic }, + { "<bits/c++io.h>", kPrivate, "<ext/stdio_sync_filebuf.h>", kPublic }, + { "<bits/c++config.h>", kPrivate, "<cstddef>", kPublic }, + { "<bits/cmath.tcc>", kPrivate, "<cmath>", kPublic }, + { "<bits/codecvt.h>", kPrivate, "<fstream>", kPublic }, + { "<bits/cxxabi_tweaks.h>", kPrivate, "<cxxabi.h>", kPublic }, + { "<bits/functional_hash.h>", kPrivate, "<unordered_map>", kPublic }, + { "<bits/hashtable.h>", kPrivate, "<unordered_map>", kPublic }, + { "<bits/hashtable.h>", kPrivate, "<unordered_set>", kPublic }, + { "<bits/ios_base.h>", kPrivate, "<iostream>", kPublic }, + { "<bits/ios_base.h>", kPrivate, "<iomanip>", kPublic }, + { "<bits/postypes.h>", kPrivate, "<iostream>", kPublic }, + { "<bits/stl_pair.h>", kPrivate, "<tr1/utility>", kPublic }, + { "<bits/stl_tree.h>", kPrivate, "<map>", kPublic }, + { "<bits/stl_tree.h>", kPrivate, "<set>", kPublic }, { "<tr1_impl/array>", kPrivate, "<array>", kPublic }, { "<tr1_impl/array>", kPrivate, "<tr1/array>", kPublic }, { "<tr1_impl/boost_shared_ptr.h>", kPrivate, "<memory>", kPublic }, @@ -664,12 +783,10 @@ const IncludeMapEntry libstdcpp_include_map[] = { { "<tr1_impl/unordered_set>", kPrivate, "<unordered_set>", kPublic }, { "<tr1_impl/utility>", kPrivate, "<tr1/utility>", kPublic }, { "<tr1_impl/utility>", kPrivate, "<utility>", kPublic }, - { "<bits/move.h>", kPrivate, "<utility>", kPublic }, // Hash and hashtable-based containers. { "<tr1_impl/functional_hash.h>", kPrivate, "<tr1/functional>", kPublic }, { "<tr1_impl/functional_hash.h>", kPrivate, "<tr1/unordered_map>", kPublic }, { "<tr1_impl/functional_hash.h>", kPrivate, "<tr1/unordered_set>", kPublic }, - { "<tr1/functional_hash.h>", kPrivate, "<tr1/functional>", kPublic }, { "<tr1/functional_hash.h>", kPrivate, "<tr1/unordered_map>", kPublic }, { "<tr1/functional_hash.h>", kPrivate, "<tr1/unordered_set>", kPublic }, { "<tr1_impl/hashtable>", kPrivate, "<tr1/unordered_map>", kPublic }, @@ -679,65 +796,23 @@ const IncludeMapEntry libstdcpp_include_map[] = { // All .tcc files are gcc internal-include files. We get them from // ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && grep -R '^ *# *include.*tcc' * | perl -nle 'm/^([^:]+).*[<"]([^>"]+)[>"]/ && print qq@ { "<$2>", kPrivate, "<$1>", kPublic },@' | sort ) // I had to manually edit some of the entries to say the map-to is private. - { "<bits/basic_ios.tcc>", kPrivate, "<bits/basic_ios.h>", kPrivate }, - { "<bits/basic_string.tcc>", kPrivate, "<string>", kPublic }, { "<bits/cmath.tcc>", kPrivate, "<cmath>", kPublic }, - { "<bits/deque.tcc>", kPrivate, "<deque>", kPublic }, - { "<bits/fstream.tcc>", kPrivate, "<fstream>", kPublic }, - { "<bits/istream.tcc>", kPrivate, "<istream>", kPublic }, - { "<bits/list.tcc>", kPrivate, "<list>", kPublic }, - { "<bits/locale_classes.tcc>", kPrivate, - "<bits/locale_classes.h>", kPrivate }, - { "<bits/locale_facets.tcc>", kPrivate, "<bits/locale_facets.h>", kPrivate }, - { "<bits/locale_facets_nonio.tcc>", kPrivate, - "<bits/locale_facets_nonio.h>", kPrivate }, - { "<bits/ostream.tcc>", kPrivate, "<ostream>", kPublic }, - { "<bits/sstream.tcc>", kPrivate, "<sstream>", kPublic }, - { "<bits/streambuf.tcc>", kPrivate, "<streambuf>", kPublic }, - { "<bits/valarray_array.tcc>", kPrivate, - "<bits/valarray_array.h>", kPrivate }, - { "<bits/vector.tcc>", kPrivate, "<vector>", kPublic }, { "<debug/safe_iterator.tcc>", kPrivate, "<debug/safe_iterator.h>", kPublic }, - { "<tr1/bessel_function.tcc>", kPrivate, "<tr1/cmath>", kPublic }, - { "<tr1/beta_function.tcc>", kPrivate, "<tr1/cmath>", kPublic }, - { "<tr1/ell_integral.tcc>", kPrivate, "<tr1/cmath>", kPublic }, - { "<tr1/exp_integral.tcc>", kPrivate, "<tr1/cmath>", kPublic }, - { "<tr1/gamma.tcc>", kPrivate, "<tr1/cmath>", kPublic }, - { "<tr1/hypergeometric.tcc>", kPrivate, "<tr1/cmath>", kPublic }, - { "<tr1/legendre_function.tcc>", kPrivate, "<tr1/cmath>", kPublic }, - { "<tr1/modified_bessel_func.tcc>", kPrivate, "<tr1/cmath>", kPublic }, - { "<tr1/poly_hermite.tcc>", kPrivate, "<tr1/cmath>", kPublic }, - { "<tr1/poly_laguerre.tcc>", kPrivate, "<tr1/cmath>", kPublic }, - { "<tr1/riemann_zeta.tcc>", kPrivate, "<tr1/cmath>", kPublic }, { "<tr1_impl/random.tcc>", kPrivate, "<tr1_impl/random>", kPrivate }, // Some bits->bits #includes: A few files in bits re-export // symbols from other files in bits. // ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && grep '^ *# *include.*bits/' bits/* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@ { "<$2>", kPrivate, "<$1>", kPrivate },@' | grep bits/ | sort -u) // and carefully picked reasonable-looking results (algorithm // *uses* pair but doesn't *re-export* pair, for instance). - { "<bits/boost_concept_check.h>", kPrivate, - "<bits/concept_check.h>", kPrivate }, { "<bits/c++allocator.h>", kPrivate, "<bits/allocator.h>", kPrivate }, - { "<bits/codecvt.h>", kPrivate, "<bits/locale_facets_nonio.h>", kPrivate }, { "<bits/ctype_base.h>", kPrivate, "<bits/locale_facets.h>", kPrivate }, { "<bits/ctype_inline.h>", kPrivate, "<bits/locale_facets.h>", kPrivate }, - { "<bits/functexcept.h>", kPrivate, "<bits/stl_algobase.h>", kPrivate }, - { "<bits/locale_classes.h>", kPrivate, "<bits/basic_ios.h>", kPrivate }, - { "<bits/locale_facets.h>", kPrivate, "<bits/basic_ios.h>", kPrivate }, { "<bits/messages_members.h>", kPrivate, "<bits/locale_facets_nonio.h>", kPrivate }, - { "<bits/postypes.h>", kPrivate, "<bits/char_traits.h>", kPrivate }, - { "<bits/slice_array.h>", kPrivate, "<bits/valarray_before.h>", kPrivate }, - { "<bits/stl_construct.h>", kPrivate, "<bits/stl_tempbuf.h>", kPrivate }, { "<bits/stl_move.h>", kPrivate, "<bits/stl_algobase.h>", kPrivate }, - { "<bits/stl_uninitialized.h>", kPrivate, "<bits/stl_tempbuf.h>", kPrivate }, - { "<bits/stl_vector.h>", kPrivate, "<bits/stl_bvector.h>", kPrivate }, - { "<bits/streambuf_iterator.h>", kPrivate, "<bits/basic_ios.h>", kPrivate }, // I don't think we want to be having people move to 'backward/' // yet. (These hold deprecated STL classes that we still use // actively.) These are the ones that turned up in an analysis of - { "<backward/auto_ptr.h>", kPrivate, "<memory>", kPublic }, - { "<backward/binders.h>", kPrivate, "<functional>", kPublic }, { "<backward/hash_fun.h>", kPrivate, "<hash_map>", kPublic }, { "<backward/hash_fun.h>", kPrivate, "<hash_set>", kPublic }, { "<backward/hashtable.h>", kPrivate, "<hash_map>", kPublic }, @@ -773,7 +848,6 @@ const IncludeMapEntry libstdcpp_include_map[] = { { "<streambuf>", kPublic, "<ios>", kPublic }, // The location of exception_defines.h varies by GCC version. It should // never be included directly. - { "<bits/exception_defines.h>", kPrivate, "<exception>", kPublic }, { "<exception_defines.h>", kPrivate, "<exception>", kPublic }, }; |