[PATCH] D116098: [C++20] [Modules] Mark imported module as imported if not exported

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 23 04:04:11 PST 2021

ChuanqiXu added a comment.

In D116098#3207812 <https://reviews.llvm.org/D116098#3207812>, @urnathan wrote:

> as all exports are also imports, is there a reason we don;t also add the exports into the import table?

I am not sure if it has an intentional reason or it is just an oversight. From my practice, the `Imports` field in C++20 modules is empty all the time.

> is Exports really 'ExportedImports' and 'Imports'  really 'NotExportedImports'?  If that's the case, this patch is fine.

Yes. From the codes, only `export import X` would add `X` to the `exported` list. And if we write `import X`, the `Imports` field is empty too.



More information about the cfe-commits mailing list