Allow module aliases to be expressed in the explicit Swift module map JSON file.

For build systems that already generate these files, it makes sense to include the aliases so that the map file serves as a comprehensive index of how the module inputs are referenced.
This commit is contained in:
Tony Allevato
2024-06-30 15:56:39 -04:00
committed by Tony Allevato
parent 2b0f9aa765
commit 8752920875
6 changed files with 116 additions and 18 deletions

View File

@@ -615,6 +615,10 @@ public:
/// are the real (physical) module names on disk.
void setModuleAliases(const llvm::StringMap<StringRef> &aliasMap);
/// Adds a given alias to the map of Identifiers between module aliases and
/// their actual names.
void addModuleAlias(StringRef moduleAlias, StringRef realName);
/// Look up option used in \c getRealModuleName when module aliasing is applied.
enum class ModuleAliasLookupOption {
alwaysRealName,