File tree 3 files changed +6
-5
lines changed
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -475,13 +475,14 @@ class ASTContext final {
475
475
Identifier getIdentifier (StringRef Str) const ;
476
476
477
477
// / 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
479
479
// / the names of the imported or referenced modules in source files in the main module, and X and Y
480
480
// / are the real (physical) module names on disk.
481
481
void setModuleAliases (const llvm::StringMap<StringRef> &aliasMap);
482
482
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 ;
485
486
486
487
// / Decide how to interpret two precedence groups.
487
488
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) {
1651
1651
}
1652
1652
}
1653
1653
1654
- Identifier ASTContext::lookupModuleAlias (Identifier key) const {
1654
+ Identifier ASTContext::getRealModuleName (Identifier key) const {
1655
1655
auto found = ModuleAliasMap.find (key);
1656
1656
if (found != ModuleAliasMap.end ()) {
1657
1657
return found->second ;
Original file line number Diff line number Diff line change @@ -1565,7 +1565,7 @@ ImportedModule::removeDuplicates(SmallVectorImpl<ImportedModule> &imports) {
1565
1565
1566
1566
Identifier ModuleDecl::getRealName () const {
1567
1567
// This will return the real name for an alias (if used) or getName()
1568
- return getASTContext ().lookupModuleAlias (getName ());
1568
+ return getASTContext ().getRealModuleName (getName ());
1569
1569
}
1570
1570
1571
1571
Identifier ModuleDecl::getABIName () const {
You can’t perform that action at this time.
0 commit comments