[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)
Jon Roelofs via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 15 09:05:27 PDT 2024
================
@@ -4120,6 +4127,9 @@ void CodeGenModule::emitMultiVersionFunctions() {
TA->getArchitecture(), Feats);
} else {
const auto *TVA = CurFD->getAttr<TargetVersionAttr>();
+ if (TVA->isDefaultVersion() &&
+ CurFD->doesThisDeclarationHaveABody())
+ EmitResolver = true;
llvm::SmallVector<StringRef, 8> Feats;
TVA->getFeatures(Feats);
Options.emplace_back(cast<llvm::Function>(Func),
----------------
jroelofs wrote:
I always get `isTargetMultiVersion` confused w/ TargetVersionMultiVersion.
https://github.com/llvm/llvm-project/pull/84405
More information about the cfe-commits
mailing list