mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ClangImporter] Avoid unneeded copy for getExportedModuleName
std::string -> StringRef of long-lived backing storage. No functionality change.
This commit is contained in:
@@ -1847,11 +1847,9 @@ void ModuleFile::loadExtensions(NominalTypeDecl *nominal) {
|
||||
|
||||
// If the originating module is a private module whose interface is
|
||||
// re-exported via public module, check the name of the public module.
|
||||
std::string exportedModuleName;
|
||||
if (auto clangModuleUnit =
|
||||
dyn_cast<ClangModuleUnit>(parentModule->getFiles().front())) {
|
||||
exportedModuleName = clangModuleUnit->getExportedModuleName();
|
||||
moduleName = exportedModuleName;
|
||||
moduleName = clangModuleUnit->getExportedModuleName();
|
||||
}
|
||||
|
||||
for (auto item : *iter) {
|
||||
|
||||
Reference in New Issue
Block a user