@@ -491,13 +491,21 @@ class ASTContext final {
491491
492492 // / Look up the module alias map by the given \p key.
493493 // /
494- // / \param key A module alias or real name to look up the map by.
495- // / \param reverseLookup Default to false, but if true, it will treat the \p key as a real name and
496- // / look up the alias, which can be used to guard against real names appearing in source files.
497- // / \returns The real name or alias mapped to the key.
498- // / If \p reverseLookup is true but the \p key is an alias, it will return an empty Identifier.
499- // / If no aliasing is used, \p key will be returned.
500- Identifier getRealModuleName (Identifier key, bool reverseLookup = false ) const ;
494+ // / \param key A module alias or real name to look up the map by
495+ // / \param alwaysReturnRealName Indicates whether it should always retrieve the real module name
496+ // / given \p key. Defaults to true. This takes a higher precedence than
497+ // / \p lookupAliasFromReal.
498+ // / \param lookupAliasFromReal Indicates whether to look up an alias by treating \p key
499+ // / as a real name. Defaults to false.
500+ // / \return The real name or alias mapped to the key.
501+ // / If \p alwaysReturnRealName is true, return the real module name if \p key is an alias
502+ // / or the key itself since that's the real name.
503+ // / If \p lookupAliasFromReal is true, and \p alwaysReturnRealName is false, return
504+ // / only if \p key is a real name, else an empty Identifier.
505+ // / If no aliasing is used, return \p key.
506+ Identifier getRealModuleName (Identifier key,
507+ bool alwaysReturnRealName = true ,
508+ bool lookupAliasFromReal = false ) const ;
501509
502510 // / Decide how to interpret two precedence groups.
503511 Associativity associateInfixOperators (PrecedenceGroupDecl *left,
0 commit comments