Skip to content

Commit 71d0e86

Browse files
committed
Remove unnecessary code
1 parent 8476d7e commit 71d0e86

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

llvm/lib/Transforms/Coroutines/CoroEarly.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,22 +200,12 @@ void Lowerer::lowerEarlyIntrinsics(Function &F) {
200200
default:
201201
continue;
202202
case Intrinsic::coro_begin:
203-
case Intrinsic::coro_begin_custom_abi: {
204-
auto CBI = cast<CoroBeginInst>(&I);
205-
206-
// Ignore coro id's that aren't pre-split.
207-
auto Id = dyn_cast<CoroIdInst>(CBI->getId());
208-
if (Id && !Id->getInfo().isPreSplit())
209-
break;
210-
203+
case Intrinsic::coro_begin_custom_abi:
211204
if (CoroBegin)
212205
report_fatal_error(
213206
"coroutine should have exactly one defining @llvm.coro.begin");
214-
CBI->addRetAttr(Attribute::NonNull);
215-
CBI->addRetAttr(Attribute::NoAlias);
216-
CoroBegin = CBI;
207+
CoroBegin = cast<CoroBeginInst>(&I);
217208
break;
218-
}
219209
case Intrinsic::coro_free:
220210
CoroFrees.push_back(cast<CoroFreeInst>(&I));
221211
break;

0 commit comments

Comments
 (0)