@@ -477,26 +477,24 @@ class ASTContext final {
477
477
// / specified string.
478
478
Identifier getIdentifier (StringRef Str) const ;
479
479
480
- // / Convert a given alias map to a map of Identifiers between module aliases and their actual names.
481
- // / For example, if '-module-alias Foo=X -module-alias Bar=Y' input is passed in, the aliases Foo and Bar are
482
- // / the names of the imported or referenced modules in source files in the main module, and X and Y
483
- // / are the real (physical) module names on disk.
480
+ // / Convert a given module alias map (with `-module-alias` option) to a map of entries that are
481
+ // / keyed both module aliases and real names along with a boolean indicating whether the entry
482
+ // / is an alias or a real name.
483
+ // / An entry with a module alias as key will have value: (real module name, true), and
484
+ // / an entry with a module real name as key will have value: (module alias, false).
484
485
void setModuleAliases (const llvm::StringMap<StringRef> &aliasMap);
485
486
486
487
// / Retrieve the actual module name if a module alias is used via '-module-alias Foo=X', where Foo is
487
488
// / a module alias and X is the real (physical) name. Returns \p key if no aliasing is used.
488
489
Identifier getRealModuleName (Identifier key) const ;
489
490
490
- // / Checks if the given \p key is a module alias or a module real name.
491
- // / If \p key is a module alias, it returns a pair of its corresponding real name and 'true',
492
- // / if \p key is a module real name, it returns a pair of its corresponding alias, and 'false', and
493
- // / if \p key is a non-aliased module name, it returns a pair of that given name and 'true'.
494
- // /
495
- // / This can be used to check if the module real name appears in source files, in which case error diags
496
- // / should be emitted (only aliases should allowed).
497
- // /
498
- // / \param key A module name (alias, real name, or non-aliased name)
499
- // / \returns A pair of the module real name and 'true' if the \p key is an alias
491
+ // / Retrieve the value mapped to the given key.
492
+ // / \param key A module alias or real name (or non-aliased name) to look up
493
+ // / \returns A pair of a module alias or real name given \p key, and a boolean indicating if the
494
+ // / \p key is an alias
495
+ // / If \p key is a module alias, it returns: (corresponding real name, true)
496
+ // / if \p key is a module real name, it returns: (corresponding alias, false), and
497
+ // / if \p key is a non-aliased module name, it returns (key, true).
500
498
std::pair<Identifier, bool > getRealModuleNameOrAlias (Identifier key) const ;
501
499
502
500
// / Decide how to interpret two precedence groups.
0 commit comments