mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ModuleInterface] Print alias for module names in swiftinterface files
Ambiguities are introduced in generated swiftinterfaces when a type shares a name with a module (i.e. XCTest). This workaround uses the module-alias feature to avoid these ambiguities. Writing module references with a distinguishable prefix should allow normal type-checking to avoid the usual ambiguities. We should still aim for a proper fully-qualified named syntax, but this may help in the mean time. rdar://101969500
This commit is contained in:
@@ -33,6 +33,10 @@ struct ModuleInterfaceOptions {
|
||||
/// interface, or should we fully-qualify them?
|
||||
bool PreserveTypesAsWritten = false;
|
||||
|
||||
/// Use aliases when printing references to modules to avoid ambiguities
|
||||
/// with types sharing a name with a module.
|
||||
bool AliasModuleNames = false;
|
||||
|
||||
/// See \ref FrontendOptions.PrintFullConvention.
|
||||
/// [TODO: Clang-type-plumbing] This check should go away.
|
||||
bool PrintFullConvention = false;
|
||||
|
||||
Reference in New Issue
Block a user