Skip to content

Commit c58d4db

Browse files
authored
Merge pull request #58649 from kavon/bolstered-breadcrumb
[gardening] Bolstered breadcrumb deferment with an assert.
2 parents 0094470 + 8923391 commit c58d4db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/SILGen/ResultPlan.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,9 @@ class ForeignAsyncInitializationPlan final : public ResultPlan {
598598
return ManagedValue::forUnmanaged(block);
599599
}
600600

601-
void deferExecutorBreadcrumb(ExecutorBreadcrumb &&breadcrumb) override {
602-
this->breadcrumb = breadcrumb;
601+
void deferExecutorBreadcrumb(ExecutorBreadcrumb &&crumb) override {
602+
assert(!breadcrumb.needsEmit() && "overwriting an existing breadcrumb?");
603+
breadcrumb = std::move(crumb);
603604
}
604605

605606
RValue finish(SILGenFunction &SGF, SILLocation loc, CanType substType,

0 commit comments

Comments
 (0)