[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)
Tomas Matheson via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 28 08:20:39 PDT 2024
================
@@ -11465,6 +11465,10 @@ static bool CheckMultiVersionFirstFunction(Sema &S, FunctionDecl *FD) {
// otherwise it is treated as a normal function.
if (TA && !TA->isDefaultVersion())
return false;
+ // The target_version attribute only causes Multiversioning if this
+ // declaration is NOT the default version.
+ if (TVA && TVA->isDefaultVersion())
+ return false;
----------------
tmatheson-arm wrote:
Is it allowed to have both `target` and `target_version` on the same function? If so, can these early returns interfere with each other?
https://github.com/llvm/llvm-project/pull/96628
More information about the cfe-commits
mailing list