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(
356
356
// present.
357
357
for (AnyCoroSuspendInst *CS : CoroSuspends) {
358
358
CS->replaceAllUsesWith (PoisonValue::get (CS->getType ()));
359
- CS->eraseFromParent ();
360
359
if (auto *CoroSave = CS->getCoroSave ())
361
360
CoroSave->eraseFromParent ();
361
+ CS->eraseFromParent ();
362
362
}
363
363
CoroSuspends.clear ();
364
364
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