Skip to content

Commit bd1b6d1

Browse files
committed
Report fatal error when missing swift_task_deinitOnExecutor
1 parent f3c687d commit bd1b6d1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/SILGen/SILGenDestructor.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,11 @@ void SILGenFunction::emitIsolatingDestructor(DestructorDecl *dd) {
373373

374374
// Get deinitOnExecutor
375375
FuncDecl *swiftDeinitOnExecutorDecl = SGM.getDeinitOnExecutor();
376-
assert(swiftDeinitOnExecutorDecl &&
377-
"Failed to find swift_task_deinitOnExecutor function decl");
376+
if (!swiftDeinitOnExecutorDecl) {
377+
llvm::report_fatal_error(
378+
"Failed to find swift_task_deinitOnExecutor function decl! "
379+
"This is likely due to an outdated/incompatible SDK.");
380+
}
378381
SILFunction *swiftDeinitOnExecutorSILFunc = SGM.getFunction(
379382
SILDeclRef(swiftDeinitOnExecutorDecl, SILDeclRef::Kind::Func),
380383
NotForDefinition);

0 commit comments

Comments
 (0)