[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)
Tomas Matheson via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 27 04:31:50 PDT 2024
================
@@ -11498,11 +11502,9 @@ static void patchDefaultTargetVersion(FunctionDecl *From, FunctionDecl *To) {
if (MVKindTo == MultiVersionKind::None &&
(MVKindFrom == MultiVersionKind::TargetVersion ||
- MVKindFrom == MultiVersionKind::TargetClones)) {
- To->setIsMultiVersion();
+ MVKindFrom == MultiVersionKind::TargetClones))
To->addAttr(TargetVersionAttr::CreateImplicit(
To->getASTContext(), "default", To->getSourceRange()));
- }
}
static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD,
----------------
tmatheson-arm wrote:
```suggestion
static bool CheckAttributeCausesMultiVersioning(Sema &S, FunctionDecl *OldFD,
```
https://github.com/llvm/llvm-project/pull/96628
More information about the cfe-commits
mailing list