File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
lib/Transforms/Coroutines
test/Transforms/Coroutines Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -356,9 +356,9 @@ void coro::Shape::invalidateCoroutine(
356356 // present.
357357 for (AnyCoroSuspendInst *CS : CoroSuspends) {
358358 CS->replaceAllUsesWith (PoisonValue::get (CS->getType ()));
359- CS->eraseFromParent ();
360359 if (auto *CoroSave = CS->getCoroSave ())
361360 CoroSave->eraseFromParent ();
361+ CS->eraseFromParent ();
362362 }
363363 CoroSuspends.clear ();
364364
Original file line number Diff line number Diff line change 1+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2+ ; Tests that coro-split correctly invalidate bad coroutines
3+ ; RUN: opt < %s -passes='cgscc(coro-split)' -S | FileCheck %s
4+
5+ define void @pr156444 () presplitcoroutine {
6+ ; CHECK-LABEL: define void @pr156444(
7+ ; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
8+ ; CHECK-NEXT: [[ENTRY:.*:]]
9+ ; CHECK-NEXT: ret void
10+ ;
11+ entry:
12+ %0 = call i8 @llvm.coro.suspend (token none, i1 false )
13+ ret void
14+ }
You can’t perform that action at this time.
0 commit comments