This is an archive of the discontinued LLVM Phabricator instance.

[C++2x][Modules] Amend module purview constant linkage [P2788R0].
ClosedPublic

Authored by iains on Mar 12 2023, 1:55 PM.

Details

Summary

This paper has been applied to the working draft and is believed to be
a DR against C++20, so that the patch here makes the change unconditionally.

for:

export module A;

const int mod_cst = 10;

Before the change, mod_cst would have internal linkage; after the change it
has module linkage.

Diff Detail

Event Timeline

iains created this revision.Mar 12 2023, 1:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 12 2023, 1:55 PM
iains updated this revision to Diff 504524.Mar 13 2023, 12:18 AM

rebase, remove use of fmodule-file=X=path to attempt to resolve Windows fail.

iains updated this revision to Diff 504591.Mar 13 2023, 4:24 AM

rebased, try to fix Windows CI, take 2.

iains published this revision for review.Mar 13 2023, 6:14 AM
iains added a reviewer: rsmith.

I should definitely check to make sure that this was adopted as a DR against C++20 (otherwise we would need to use the previous test conditionally on < 2b).

Herald added a project: Restricted Project. · View Herald TranscriptMar 13 2023, 6:15 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Mar 13 2023, 7:26 AM
iains updated this revision to Diff 506380.Mar 19 2023, 4:37 AM

rebased.

This revision was landed with ongoing or failed builds.Mar 19 2023, 9:26 AM
This revision was automatically updated to reflect the committed changes.