Skip to content

Commit 889ce26

Browse files
committed
Simplify code
1 parent 2eaa148 commit 889ce26

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

llvm/lib/IR/AutoUpgrade.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,14 +1138,11 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn,
11381138
return true;
11391139
}
11401140

1141-
if (F->arg_size() == 6 && Name == "coro.id.retcon.once") {
1142-
auto *FT = F->getFunctionType();
1143-
if (!FT->isVarArg()) {
1144-
rename(F);
1145-
NewFn = Intrinsic::getDeclaration(F->getParent(),
1146-
Intrinsic::coro_id_retcon_once);
1147-
return true;
1148-
}
1141+
if (!F->isVarArg() && Name == "coro.id.retcon.once") {
1142+
rename(F);
1143+
NewFn = Intrinsic::getDeclaration(F->getParent(),
1144+
Intrinsic::coro_id_retcon_once);
1145+
return true;
11491146
}
11501147

11511148
break;

0 commit comments

Comments
 (0)