Skip to content

Commit 0dd2c9f

Browse files
committed
Fix-forward build error from #132489
Replace deprecated use of getDeclaration that was added in #132489 llvm/lib/IR/AutoUpgrade.cpp:1480:26: error: 'getDeclaration' is deprecated: Use getOrInsertDeclaration instead [-Werror,-Wdeprecated-declarations] 1480 | NewFn = Intrinsic::getDeclaration( | ^~~~~~~~~~~~~~ | getOrInsertDeclaration
1 parent 960afcc commit 0dd2c9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/IR/AutoUpgrade.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn,
14771477

14781478
case 't':
14791479
if (Name == "thread.pointer") {
1480-
NewFn = Intrinsic::getDeclaration(
1480+
NewFn = Intrinsic::getOrInsertDeclaration(
14811481
F->getParent(), Intrinsic::thread_pointer, F->getReturnType());
14821482
return true;
14831483
}

0 commit comments

Comments
 (0)