mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #39705 from apple/es-module-alias-serialize
[Module aliasing] Serialize SIL and binaries with module real names for referenced or imported modules. Resolves rdar://83632529
This commit is contained in:
@@ -1499,9 +1499,11 @@ ModuleDecl::ReverseFullNameIterator::ReverseFullNameIterator(
|
||||
|
||||
StringRef ModuleDecl::ReverseFullNameIterator::operator*() const {
|
||||
assert(current && "all name components exhausted");
|
||||
|
||||
// Return the module's real (binary) name, which can be different from
|
||||
// the name if module aliasing was used (-module-alias flag). The real
|
||||
// name is used for serialization and loading.
|
||||
if (auto *swiftModule = current.dyn_cast<const ModuleDecl *>())
|
||||
return swiftModule->getName().str();
|
||||
return swiftModule->getRealName().str();
|
||||
|
||||
auto *clangModule =
|
||||
static_cast<const clang::Module *>(current.get<const void *>());
|
||||
|
||||
Reference in New Issue
Block a user