Page MenuHomePhabricator

[C++20] [Module] Support reachable definition initially/partially
Changes PlannedPublic

Authored by ChuanqiXu on Nov 10 2021, 12:11 AM.



This fixes: and

This patch introduces a new kind of ModuleOwnershipKind as ReachableWhenImported. This intended the status for reachable described at:

Note that this patch is not intended to support all semantics about reachable semantics.

An important feature not included in this patch is discarding declaration in global module fragment. See and This feature is important since it would cut off many unused declarations so that user could import a large module without worrying it would be too heavy. And I think this is related to the bug mentioned @rsmith .

But after all, I think it is not easy to implement in one shot. So this patch didn't contain that feature. In other words, now all the declarations in the global module fragment are reachable even they could be reduced. But this is not worse than the current situation. So I think it may not be unacceptable.

Test Plan: check-all and

Diff Detail

Event Timeline

ChuanqiXu created this revision.Nov 10 2021, 12:11 AM
ChuanqiXu requested review of this revision.Nov 10 2021, 12:11 AM
ChuanqiXu updated this revision to Diff 393028.Dec 8 2021, 10:11 PM

Update comments.

ChuanqiXu planned changes to this revision.Dec 9 2021, 3:48 AM

I think it would be better to resent this when it is more complete.