Skip to content

Commit e3333f3

Browse files
committed
[IR] Switch Intrinsic::getDeclaration to getOrInsertDeclaration. NFC.
fa789df and b9f0867 are replacing one with the other. Adopt that in this downstream bit.
1 parent d3412d4 commit e3333f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/IR/AutoUpgrade.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,8 +1146,8 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn,
11461146

11471147
if (!F->isVarArg() && Name == "coro.id.retcon.once") {
11481148
rename(F);
1149-
NewFn = Intrinsic::getDeclaration(F->getParent(),
1150-
Intrinsic::coro_id_retcon_once);
1149+
NewFn = Intrinsic::getOrInsertDeclaration(F->getParent(),
1150+
Intrinsic::coro_id_retcon_once);
11511151
return true;
11521152
}
11531153

0 commit comments

Comments
 (0)