diff options
author | Nikita Popov <npopov@redhat.com> | 2025-06-23 14:54:49 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2025-06-23 14:56:24 +0200 |
commit | 9a6a87da6e618d25c23f5f8cf6e4e0f49d4f702c (patch) | |
tree | 390eeea8dcad726a5a70de466d58cca2a6b3c350 /llvm/lib/IR/AutoUpgrade.cpp | |
parent | 9e704a0aa1588f4a5204fb308c213819400a83cc (diff) | |
download | llvm-9a6a87da6e618d25c23f5f8cf6e4e0f49d4f702c.zip llvm-9a6a87da6e618d25c23f5f8cf6e4e0f49d4f702c.tar.gz llvm-9a6a87da6e618d25c23f5f8cf6e4e0f49d4f702c.tar.bz2 |
[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.
Diffstat (limited to 'llvm/lib/IR/AutoUpgrade.cpp')
-rw-r--r-- | llvm/lib/IR/AutoUpgrade.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp index 6e7254e..e429e2d 100644 --- a/llvm/lib/IR/AutoUpgrade.cpp +++ b/llvm/lib/IR/AutoUpgrade.cpp @@ -1443,13 +1443,9 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn, break; } case 'o': - // We only need to change the name to match the mangling including the - // address space. if (Name.starts_with("objectsize.")) { Type *Tys[2] = { F->getReturnType(), F->arg_begin()->getType() }; - if (F->arg_size() == 2 || F->arg_size() == 3 || - F->getName() != - Intrinsic::getName(Intrinsic::objectsize, Tys, F->getParent())) { + if (F->arg_size() == 2 || F->arg_size() == 3) { rename(F); NewFn = Intrinsic::getOrInsertDeclaration(F->getParent(), Intrinsic::objectsize, Tys); |