Skip to content

Commit 9a6a87d

Browse files
committed
[AutoUpgrade] Remove unnecessary name check (NFCI)
If only the name is incorrect (due to added overload), but the signature is correct, we should go through the generic remangling upgrade.
1 parent 9e704a0 commit 9a6a87d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/IR/AutoUpgrade.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,13 +1443,9 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn,
14431443
break;
14441444
}
14451445
case 'o':
1446-
// We only need to change the name to match the mangling including the
1447-
// address space.
14481446
if (Name.starts_with("objectsize.")) {
14491447
Type *Tys[2] = { F->getReturnType(), F->arg_begin()->getType() };
1450-
if (F->arg_size() == 2 || F->arg_size() == 3 ||
1451-
F->getName() !=
1452-
Intrinsic::getName(Intrinsic::objectsize, Tys, F->getParent())) {
1448+
if (F->arg_size() == 2 || F->arg_size() == 3) {
14531449
rename(F);
14541450
NewFn = Intrinsic::getOrInsertDeclaration(F->getParent(),
14551451
Intrinsic::objectsize, Tys);

0 commit comments

Comments
 (0)