File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -475,13 +475,14 @@ class ASTContext final {
475475 Identifier getIdentifier (StringRef Str) const ;
476476
477477 // / Convert a given alias map to a map of Identifiers between module aliases and their actual names.
478- // / For example, if '-module-alias A =X -module-alias B =Y' input is passed in, the aliases A and B are
478+ // / For example, if '-module-alias Foo =X -module-alias Bar =Y' input is passed in, the aliases Foo and Bar are
479479 // / the names of the imported or referenced modules in source files in the main module, and X and Y
480480 // / are the real (physical) module names on disk.
481481 void setModuleAliases (const llvm::StringMap<StringRef> &aliasMap);
482482
483- // / Retrieve the actual module name given a module alias name key.
484- Identifier lookupModuleAlias (Identifier key) const ;
483+ // / Retrieve the actual module name if a module alias is used via '-module-alias Foo=X', where Foo is
484+ // / a module alias and X is the real (physical) name. Returns \p key if no aliasing is used.
485+ Identifier getRealModuleName (Identifier key) const ;
485486
486487 // / Decide how to interpret two precedence groups.
487488 Associativity associateInfixOperators (PrecedenceGroupDecl *left,
Original file line number Diff line number Diff line change @@ -1651,7 +1651,7 @@ void ASTContext::setModuleAliases(const llvm::StringMap<StringRef> &aliasMap) {
16511651 }
16521652}
16531653
1654- Identifier ASTContext::lookupModuleAlias (Identifier key) const {
1654+ Identifier ASTContext::getRealModuleName (Identifier key) const {
16551655 auto found = ModuleAliasMap.find (key);
16561656 if (found != ModuleAliasMap.end ()) {
16571657 return found->second ;
Original file line number Diff line number Diff line change @@ -1565,7 +1565,7 @@ ImportedModule::removeDuplicates(SmallVectorImpl<ImportedModule> &imports) {
15651565
15661566Identifier ModuleDecl::getRealName () const {
15671567 // This will return the real name for an alias (if used) or getName()
1568- return getASTContext ().lookupModuleAlias (getName ());
1568+ return getASTContext ().getRealModuleName (getName ());
15691569}
15701570
15711571Identifier ModuleDecl::getABIName () const {
You can’t perform that action at this time.
0 commit comments