[ModuleInterface] Ignore export_as in private swiftinterface #62476
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduce a new behavior when printing references to modules with an
export_as
definition. Use theexport_as
name in the public swiftinterface and the real module name in the private swiftinterface.This has some limits but should still be an improvement over the current behavior. First, the we use the
export_as
names only for references to clang decls, not Swift decls with an underlying module defining anexport_as
. Second, we always print theexport_as
name in the public swiftinterface, even in the original swiftinterface file when theexport_as
target is likely not know, so that generated swiftinterface is still broken.This behavior is enabled by the flags
-enable-experimental-feature ModuleInterfaceExportAs
or theSWIFT_DEBUG_USE_EXPORTED_MODULE_NAME_IN_PUBLIC_ONLY
env var. We may consider turning it on by default in the future.rdar://98532918