mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ModuleInterface] Don't alias the stdlib or builtin module
Not aliasing the stdlib should allows it to be used in inlinable code. Since builtin isn't imported explicitly, references to it shouldn't use the alias. rdar://104582241
This commit is contained in:
@@ -81,6 +81,12 @@ static void printToolVersionAndFlagsComment(raw_ostream &out,
|
||||
|
||||
for (ImportedModule import: imports) {
|
||||
StringRef importedName = import.importedModule->getNameStr();
|
||||
// Skip Swift as it's commonly used in inlinable code,
|
||||
// and Builtin as it's imported implicitly by name.
|
||||
if (importedName == STDLIB_NAME ||
|
||||
importedName == BUILTIN_NAME)
|
||||
continue;
|
||||
|
||||
if (AliasModuleNamesTargets.insert(importedName).second) {
|
||||
out << " -module-alias " << MODULE_DISAMBIGUATING_PREFIX <<
|
||||
importedName << "=" << importedName;
|
||||
|
||||
Reference in New Issue
Block a user