mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Introduce a new behavior when printing references to modules with an `export_as` definition. Use the `export_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 an `export_as`. Second, we always print the `export_as` name in the public swiftinterface, even in the original swiftinterface file when the `export_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 the `SWIFT_DEBUG_USE_EXPORTED_MODULE_NAME_IN_PUBLIC_ONLY` env var. We may consider turning it on by default in the future. rdar://98532918
6.0 KiB
6.0 KiB