Merge pull request #81417 from hamishknight/ref-nt-6.2

[6.2] [Frontend] Avoid storing StringRef values in `ModuleAliasMap`
This commit is contained in:
Hamish Knight
2025-05-10 14:12:08 +01:00
committed by GitHub
5 changed files with 15 additions and 12 deletions

View File

@@ -620,7 +620,7 @@ public:
/// For example, if '-module-alias Foo=X -module-alias Bar=Y' input is passed in, the aliases Foo and Bar are
/// the names of the imported or referenced modules in source files in the main module, and X and Y
/// are the real (physical) module names on disk.
void setModuleAliases(const llvm::StringMap<StringRef> &aliasMap);
void setModuleAliases(const llvm::StringMap<std::string> &aliasMap);
/// Adds a given alias to the map of Identifiers between module aliases and
/// their actual names.

View File

@@ -58,7 +58,7 @@ public:
std::string ImplicitObjCPCHPath;
/// The map of aliases and real names of imported or referenced modules.
llvm::StringMap<StringRef> ModuleAliasMap;
llvm::StringMap<std::string> ModuleAliasMap;
/// The name of the module that the frontend is building.
std::string ModuleName;