[ClangImporter] Avoid unneeded copy for getExportedModuleName

std::string -> StringRef of long-lived backing storage.

No functionality change.
This commit is contained in:
Jordan Rose
2019-03-21 11:46:06 -07:00
parent bfc2753976
commit 61d3b0d4ec
4 changed files with 4 additions and 6 deletions

View File

@@ -1149,7 +1149,7 @@ static bool isReExportedToModule(const ValueDecl *value,
= dyn_cast<ClangModuleUnit>(valueDC->getModuleScopeContext());
if (!fromClangModule)
return false;
std::string exportedName = fromClangModule->getExportedModuleName();
StringRef exportedName = fromClangModule->getExportedModuleName();
auto toClangModule
= dyn_cast<ClangModuleUnit>(expectedModule->getFiles().front());