Bake the _Concurrency -> Swift ABI module name into the compiler.

Using `-module-abi-name` for the `_Concurrency` module breaks older
Swift compilers. Instead, hard-code that "Swift" is the ABI name of the
"_Concurrency" module in the compiler to dodge the problem.
This commit is contained in:
Doug Gregor
2021-03-11 14:59:11 -08:00
parent eeffb0785f
commit 6ed794d188
4 changed files with 24 additions and 10 deletions

View File

@@ -167,7 +167,7 @@ class ModuleDecl : public DeclContext, public TypeDecl {
friend class DirectPrecedenceGroupLookupRequest;
/// The ABI name of the module, if it differs from the module name.
Identifier ModuleABIName;
mutable Identifier ModuleABIName;
public:
/// Produces the components of a given module's full name in reverse order.
@@ -348,9 +348,7 @@ public:
/// Retrieve the ABI name of the module, which is used for metadata and
/// mangling.
Identifier getABIName() const {
return ModuleABIName.empty() ? getName() : ModuleABIName;
}
Identifier getABIName() const;
/// Set the ABI name of the module;
void setABIName(Identifier name) {