Skip to content

Commit 4f6d00d

Browse files
authored
Merge pull request #37963 from apple/revert-37923-conditional-concurrency-standard-substitutions
Revert "Disable standard substitutions when building with "older" _Concurrency module"
2 parents c6039af + 9c8615d commit 4f6d00d

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

lib/AST/Module.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,19 +1428,9 @@ bool ModuleDecl::isStdlibModule() const {
14281428
}
14291429

14301430
bool ModuleDecl::hasStandardSubstitutions() const {
1431-
if (getParent())
1432-
return false;
1433-
1434-
if (getName() == getASTContext().StdlibModuleName)
1435-
return true;
1436-
1437-
// The _Concurrency module gets standard substitutions with "new enough"
1438-
// versions of the module.
1439-
if (getName() == getASTContext().Id_Concurrency &&
1440-
getASTContext().getProtocol(KnownProtocolKind::SerialExecutor))
1441-
return true;
1442-
1443-
return false;
1431+
return !getParent() &&
1432+
(getName() == getASTContext().StdlibModuleName ||
1433+
getName() == getASTContext().Id_Concurrency);
14441434
}
14451435

14461436
bool ModuleDecl::isSwiftShimsModule() const {

0 commit comments

Comments
 (0)