[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)
Tomas Matheson via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 8 06:42:10 PDT 2024
================
@@ -4224,10 +4204,8 @@ void CodeGenModule::emitMultiVersionFunctions() {
llvm::Function *Func = createFunction(CurFD);
Options.emplace_back(Func, TA->getArchitecture(), Feats);
} else if (const auto *TVA = CurFD->getAttr<TargetVersionAttr>()) {
- bool HasDefaultDef = TVA->isDefaultVersion() &&
- CurFD->doesThisDeclarationHaveABody();
- HasDefaultDecl |= TVA->isDefaultVersion();
- ShouldEmitResolver |= (CurFD->isUsed() || HasDefaultDef);
+ ShouldEmitResolver |= (TVA->isDefaultVersion() &&
+ CurFD->doesThisDeclarationHaveABody());
----------------
tmatheson-arm wrote:
```suggestion
if (TVA->isDefaultVersion() && CurFD->doesThisDeclarationHaveABody())
ShouldEmitResolver = true;
```
https://github.com/llvm/llvm-project/pull/97761
More information about the cfe-commits
mailing list