[Concurrency ABI] Add standard substitutions for _Concurrency types.

Introduce a second level of standard substitutions to the mangling,
all of the form `Sc<character>`, and use it to provide standard
substitutions for most of the _Concurrency types.

This is a precursor to rdar://78269642 and a good mangling-size
optimization in its own right.
This commit is contained in:
Doug Gregor
2021-06-01 17:11:32 -07:00
parent a8ae9525aa
commit b57a73ab42
16 changed files with 125 additions and 30 deletions

View File

@@ -1407,6 +1407,12 @@ bool ModuleDecl::isStdlibModule() const {
return !getParent() && getName() == getASTContext().StdlibModuleName;
}
bool ModuleDecl::hasStandardSubstitutions() const {
return !getParent() &&
(getName() == getASTContext().StdlibModuleName ||
getName() == getASTContext().Id_Concurrency);
}
bool ModuleDecl::isSwiftShimsModule() const {
return !getParent() && getName() == getASTContext().SwiftShimsModuleName;
}