mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ModuleInterface] Always ignore export-as in private swiftinterfaces
Always print the real module name for references in private swiftinterfaces, ignoring export-as declarations. Keep using the export-as name for the public swiftinterface only. The flag `ModuleInterfaceExportAs` used to enable this behavior and we're removing it to make it the default. rdar://115922907
This commit is contained in:
@@ -821,13 +821,7 @@ bool swift::emitSwiftInterface(raw_ostream &out,
|
||||
|
||||
printImports(out, Opts, M, aliasModuleNamesTargets);
|
||||
|
||||
static bool forceUseExportedModuleNameInPublicOnly =
|
||||
getenv("SWIFT_DEBUG_USE_EXPORTED_MODULE_NAME_IN_PUBLIC_ONLY");
|
||||
bool useExportedModuleNameInPublicOnly =
|
||||
M->getASTContext().LangOpts.hasFeature(Feature::ModuleInterfaceExportAs) ||
|
||||
forceUseExportedModuleNameInPublicOnly;
|
||||
bool useExportedModuleNames = !(useExportedModuleNameInPublicOnly &&
|
||||
Opts.PrintPrivateInterfaceContent);
|
||||
bool useExportedModuleNames = !Opts.PrintPrivateInterfaceContent;
|
||||
|
||||
const PrintOptions printOptions = PrintOptions::printSwiftInterfaceFile(
|
||||
M, Opts.PreserveTypesAsWritten, Opts.PrintFullConvention,
|
||||
|
||||
Reference in New Issue
Block a user