This is an archive of the discontinued LLVM Phabricator instance.

[libc++][Modules] Remove explicit exports from modules that `export *`
ClosedPublic

Authored by iana on Jun 17 2023, 6:55 PM.

Details

Summary

This may be a clang bug, but explicit exports interfere with export *, especially in local submodule visibility mode. For example, exporting depr.stdint_h from cstdint causes std::int32_t to become an "unresolved using declaration" in LSV if cstdint and stdint.h are promoted to top level modules. This was previously worked around by exporting Darwin.C.stdint in depr.stdint_h, but that only works on Apple platforms, and it stops working when cstdint and stdint.h are promoted to top level modules.

Remove all of the explicit export statements in modules that have export *.

Diff Detail

Unit TestsFailed

Event Timeline

iana created this revision.Jun 17 2023, 6:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2023, 6:55 PM
Herald added a subscriber: ributzka. · View Herald Transcript
iana requested review of this revision.Jun 17 2023, 6:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2023, 6:55 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
iana updated this revision to Diff 532508.Jun 18 2023, 7:34 PM

Reorder in the stack

iana updated this revision to Diff 533020.Jun 20 2023, 12:47 PM

Reorder this earlier in the stack

iana updated this revision to Diff 534155.Jun 23 2023, 9:47 PM

Add a newly needed export

Mordante accepted this revision.Jun 24 2023, 6:10 AM

It seems the CI is happy, so I'm happy. LGTM!

This revision is now accepted and ready to land.Jun 24 2023, 6:10 AM
iana updated this revision to Diff 534246.Jun 24 2023, 11:27 AM

The missing export was needed by the previous change in the stack

iana updated this revision to Diff 536900.Jul 3 2023, 2:25 PM

Rebase

ldionne accepted this revision.Jul 4 2023, 12:15 PM

This one looks like a cleanup to me. Thanks!

iana updated this revision to Diff 537217.Jul 4 2023, 10:15 PM

Remove the two reverts from the stack