mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Rename lookupModuleAlias to getRealModuleName
This commit is contained in:
@@ -475,13 +475,14 @@ public:
|
||||
Identifier getIdentifier(StringRef Str) const;
|
||||
|
||||
/// Convert a given alias map to a map of Identifiers between module aliases and their actual names.
|
||||
/// For example, if '-module-alias A=X -module-alias B=Y' input is passed in, the aliases A and B are
|
||||
/// 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);
|
||||
|
||||
/// Retrieve the actual module name given a module alias name key.
|
||||
Identifier lookupModuleAlias(Identifier key) const;
|
||||
/// Retrieve the actual module name if a module alias is used via '-module-alias Foo=X', where Foo is
|
||||
/// a module alias and X is the real (physical) name. Returns \p key if no aliasing is used.
|
||||
Identifier getRealModuleName(Identifier key) const;
|
||||
|
||||
/// Decide how to interpret two precedence groups.
|
||||
Associativity associateInfixOperators(PrecedenceGroupDecl *left,
|
||||
|
||||
@@ -1651,7 +1651,7 @@ void ASTContext::setModuleAliases(const llvm::StringMap<StringRef> &aliasMap) {
|
||||
}
|
||||
}
|
||||
|
||||
Identifier ASTContext::lookupModuleAlias(Identifier key) const {
|
||||
Identifier ASTContext::getRealModuleName(Identifier key) const {
|
||||
auto found = ModuleAliasMap.find(key);
|
||||
if (found != ModuleAliasMap.end()) {
|
||||
return found->second;
|
||||
|
||||
@@ -1565,7 +1565,7 @@ ImportedModule::removeDuplicates(SmallVectorImpl<ImportedModule> &imports) {
|
||||
|
||||
Identifier ModuleDecl::getRealName() const {
|
||||
// This will return the real name for an alias (if used) or getName()
|
||||
return getASTContext().lookupModuleAlias(getName());
|
||||
return getASTContext().getRealModuleName(getName());
|
||||
}
|
||||
|
||||
Identifier ModuleDecl::getABIName() const {
|
||||
|
||||
Reference in New Issue
Block a user