[all-commits] [llvm/llvm-project] 9d16cb: [libc++] Adds more forward declaration headers.

Mark de Wever via All-commits all-commits at lists.llvm.org
Thu Apr 27 08:07:26 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d16cbc5c8bdf976287cc97c7d95d115496e3077
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M libcxx/include/CMakeLists.txt
    A libcxx/include/__fwd/fstream.h
    A libcxx/include/__fwd/ios.h
    A libcxx/include/__fwd/istream.h
    A libcxx/include/__fwd/ostream.h
    A libcxx/include/__fwd/sstream.h
    A libcxx/include/__fwd/streambuf.h
    M libcxx/include/fstream
    M libcxx/include/ios
    M libcxx/include/iosfwd
    M libcxx/include/istream
    M libcxx/include/module.modulemap.in
    M libcxx/include/ostream
    M libcxx/include/sstream
    M libcxx/include/streambuf
    M libcxx/test/libcxx/private_headers.verify.cpp
    M libcxx/utils/data/ignore_format.txt

  Log Message:
  [libc++] Adds more forward declaration headers.

The module validation script of D144994 validate whether the contents of
an include match its module. An include is the set of files matching the
- foo
- foo/*.
- __fwd/foo.h

Several declarations of the stream headers are in the header iosfwd.
This gives issue using the validation script. Adding iosfwd to the set
of matching files gives too many declarations. For example when
validating the fstream header it will pull in declarations of the
istream header. Instead if writing a set of filters the headers are
granularized into smaller headers containing the expected declarations.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D148927

More information about the All-commits mailing list