================
@@ -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),
----------------
labrinea wrote:
It is initialized with `!FD->isTargetVersionMultiVersion()` so it is set to
true for target clones. However I've just found a bug when we don't have a
default definition but we do have a caller in the TU. In that case we should be
checking `isUsed()` too. I'll fix this.
https://github.com/llvm/llvm-project/pull/84405
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits