[clang] [RISCV][FMV] Support target_version (PR #99040)
Piyou Chen via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 22 22:58:03 PDT 2024
================
@@ -4268,8 +4268,12 @@ void CodeGenModule::emitMultiVersionFunctions() {
} else if (const auto *TVA = CurFD->getAttr<TargetVersionAttr>()) {
if (TVA->isDefaultVersion() && IsDefined)
ShouldEmitResolver = true;
- TVA->getFeatures(Feats);
llvm::Function *Func = createFunction(CurFD);
+ if (getTarget().getTriple().isRISCV()) {
+ Feats.push_back(TVA->getName());
+ } else {
+ TVA->getFeatures(Feats);
----------------
BeMg wrote:
Added.
https://github.com/llvm/llvm-project/pull/99040
More information about the cfe-commits
mailing list