Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0
# d6832a61 05-Sep-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++][modules] Modularize <cstddef> (#107254)

Many headers include `<cstddef>` just for size_t, and pulling in
additional content (e.g. the traits used for std::byte) is unnecessary.
To solve t

[libc++][modules] Modularize <cstddef> (#107254)

Many headers include `<cstddef>` just for size_t, and pulling in
additional content (e.g. the traits used for std::byte) is unnecessary.
To solve this problem, this patch splits up `<cstddef>` into
subcomponents so that headers can include only the parts that they
actually require.

This has the added benefit of making the modules build a lot stricter
with respect to IWYU, and also providing a canonical location where we
define `std::size_t` and friends (which were previously defined in
multiple headers like `<cstddef>` and `<ctime>`).

After this patch, there's still many places in the codebase where we
include `<cstddef>` when `<__cstddef/size_t.h>` would be sufficient.
This patch focuses on removing `<cstddef>` includes from __type_traits
to make these headers non-circular with `<cstddef>`. Additional
refactorings can be tackled separately.

show more ...


Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3
# 5c717d6b 10-Aug-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] re-enable clang-tidy in the CI and fix any issues (#102658)

It looks like we've accidentally disabled clang-tidy in the CI. This
re-enables it and fixes the issues accumulated while it was

[libc++] re-enable clang-tidy in the CI and fix any issues (#102658)

It looks like we've accidentally disabled clang-tidy in the CI. This
re-enables it and fixes the issues accumulated while it was disabled.

show more ...


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7
# aaa4ff88 03-Jun-2024 David Stone <davidfromonline@gmail.com>

[clang][Modules] Remove unnecessary includes of `Module.h` (#93417)


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3
# a5cc1dc8 09-Feb-2024 Mark de Wever <koraq@xs4all.nl>

[NFC][libc++] Removes obsolete compiler support. (#80481)

These work-arounds were slated for removal in LLVM-18, but missed the
deadline.


Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init
# fb79f80b 17-Jan-2024 Mark de Wever <koraq@xs4all.nl>

[libc++][modules] Fixes clang-tidy exports. (#76288)

As suggested in #71438 we should use
export import std;
in the std.compat module.

Using this exports some named declarations from function

[libc++][modules] Fixes clang-tidy exports. (#76288)

As suggested in #71438 we should use
export import std;
in the std.compat module.

Using this exports some named declarations from functions and records,
adding them to the global namespace. Clang correctly does not export
these and it's an issue in the declaration filtering. Declarations in
function or record context are not considered a global named
declaration.

show more ...


# c313d0d0 31-Dec-2023 Mark de Wever <koraq@xs4all.nl>

[NFC][libc++] Fixes a compiler warning.


# 7d34f8c0 12-Dec-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][module] Fixes std::string UDL. (#75000)

The fix changes the way the validation script determines the qualified
name of a declaration. Inline namespaces without a reserved name are now
alw

[libc++][module] Fixes std::string UDL. (#75000)

The fix changes the way the validation script determines the qualified
name of a declaration. Inline namespaces without a reserved name are now
always part of the name. The Clang code only does this when the names
are ambigious. This method is often used for the operator""foo for UDLs.

Adjusted the newly flagged issue and removed a work-around in the test
code that is no longer required.

Fixes https://github.com/llvm/llvm-project/issues/72427

show more ...


# 600462a2 09-Dec-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][modules] Adds std.compat module. (#71438)

This adds the std.compat module. The patch contains a bit of refactoring
to avoid code duplication between the std and std.compat module.

Imple

[libc++][modules] Adds std.compat module. (#71438)

This adds the std.compat module. The patch contains a bit of refactoring
to avoid code duplication between the std and std.compat module.

Implements parts of
- P2465R3 Standard Library Modules std and std.compat

show more ...


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3
# 2c629eb5 11-Aug-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][CI] Fixes error messages.

Fixes 2 error messages from the module test clang-tidy plugin.
- an issue where an empty filename can't be used in an AST matcher
- an issue where no filename is v

[libc++][CI] Fixes error messages.

Fixes 2 error messages from the module test clang-tidy plugin.
- an issue where an empty filename can't be used in an AST matcher
- an issue where no filename is valid when testing the std module cppm
This reduces the output of the test, making it easier to find the real
error when the test fails.

Reviewed By: philnik, #libc

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

show more ...


Revision tags: llvmorg-17.0.0-rc2
# 4d4c70c9 02-Aug-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][modules] Removes the module partitions.

This patch is based on the suggestion by @ChuanqiXu on discourse
(https://discourse.llvm.org/t/alternatives-to-the-implementation-of-std-modules/7195

[libc++][modules] Removes the module partitions.

This patch is based on the suggestion by @ChuanqiXu on discourse
(https://discourse.llvm.org/t/alternatives-to-the-implementation-of-std-modules/71958)

Instead of making a module partition per header every header gets an inc
file which contains the exports per header. The std module then includes
all public headers and these inc files. The one file per header is
useful for testing purposes. The CI tests whether the exports of a
header's module partition matches the "public" named declarations in the
header. With one file per header this can still be done.

The patch improves compilation time of files using "import std;" and the
size of the std module.

A comparision of the compilation speed using a libc++ test
build/bin/llvm-lit -a -Dstd=c++23 -Denable_modules=std libcxx/test/std/modules/std.pass.cpp

Which boils down to
import std;

int main(int, char**) {
std::println("Hello modular world");
return 0;
}
and has -ftime-report enabled

Before
===-------------------------------------------------------------------------===
Clang front-end time report
===-------------------------------------------------------------------------===
Total Execution Time: 8.6585 seconds (8.6619 wall clock)

---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
4.5041 ( 57.2%) 0.4264 ( 54.4%) 4.9305 ( 56.9%) 4.9331 ( 57.0%) Clang front-end timer
3.2037 ( 40.7%) 0.2408 ( 30.7%) 3.4445 ( 39.8%) 3.4452 ( 39.8%) Reading modules
0.1665 ( 2.1%) 0.1170 ( 14.9%) 0.2835 ( 3.3%) 0.2837 ( 3.3%) Loading .../build/test/__config_module__/CMakeFiles/std.dir/std.pcm
7.8744 (100.0%) 0.7842 (100.0%) 8.6585 (100.0%) 8.6619 (100.0%) Total

After
===-------------------------------------------------------------------------===
Clang front-end time report
===-------------------------------------------------------------------------===
Total Execution Time: 1.2420 seconds (1.2423 wall clock)

---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
0.8892 ( 84.6%) 0.1698 ( 88.8%) 1.0590 ( 85.3%) 1.0590 ( 85.2%) Clang front-end timer
0.1533 ( 14.6%) 0.0168 ( 8.8%) 0.1701 ( 13.7%) 0.1704 ( 13.7%) Reading modules
0.0082 ( 0.8%) 0.0047 ( 2.5%) 0.0129 ( 1.0%) 0.0129 ( 1.0%) Loading .../build/test/__config_module__/CMakeFiles/std.dir/std.pcm
1.0507 (100.0%) 0.1913 (100.0%) 1.2420 (100.0%) 1.2423 (100.0%) Total

Using "include <print>" instead of "import module;"
===-------------------------------------------------------------------------===
Clang front-end time report
===-------------------------------------------------------------------------===
Total Execution Time: 2.1507 seconds (2.1517 wall clock)

---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
1.9714 (100.0%) 0.1793 (100.0%) 2.1507 (100.0%) 2.1517 (100.0%) Clang front-end timer
1.9714 (100.0%) 0.1793 (100.0%) 2.1507 (100.0%) 2.1517 (100.0%) Total

It's possible to use the std module in external projects
(https://libcxx.llvm.org/Modules.html#using-in-external-projects)

Tested this with a private project to validate the size of the generated files:

Before
$ du -sch std-*
448M std-build
508K std-src
120K std-subbuild
449M total

After
$ du -sch std-*
29M std-build
1004K std-src
132K std-subbuild
30M total

Reviewed By: ldionne, #libc

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

show more ...


Revision tags: llvmorg-17.0.0-rc1
# bae14bcd 28-Jul-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][modules] Improves export validation.

Adds tests to guard against the issue solved in D156592.

Depends on D156592

Reviewed By: ChuanqiXu, #libc, philnik

Differential Revision: https://rev

[libc++][modules] Improves export validation.

Adds tests to guard against the issue solved in D156592.

Depends on D156592

Reviewed By: ChuanqiXu, #libc, philnik

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

show more ...


Revision tags: llvmorg-18-init
# c62e88ee 07-Jul-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][modules] Avoids duplicated exports.

The first issue was found by @ldionne, upon further investigation there
were more duplicates. This removes the duplicates and updates the
clang-tidy test

[libc++][modules] Avoids duplicated exports.

The first issue was found by @ldionne, upon further investigation there
were more duplicates. This removes the duplicates and updates the
clang-tidy test to detect duplicates.

Reviewed By: ldionne, #libc

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

show more ...


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4
# 9b08c8a2 28-Feb-2023 Mark de Wever <koraq@xs4all.nl>

[libc++][modules] Adds the C++23 std module.

The patch is based on D144994.

D151030 added the module definitions for the module std.
This patch wires in the module and enables the basic testing.

S

[libc++][modules] Adds the C++23 std module.

The patch is based on D144994.

D151030 added the module definitions for the module std.
This patch wires in the module and enables the basic testing.

Some notable features are missing:
- There is no test that libc++ can be fully imported as a module.
- This lacks the parts for the std.compat module.
- The module is not shipped with libc++.

Implements parts of
- P2465R3 Standard Library Modules std and std.compat

Reviewed By: ldionne, aaronmondal, #libc

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

show more ...