Skip to content

Commit 894c097

Browse files
committed
[RISCV] Disallow target attribute use in multiversioning
1 parent 21265f6 commit 894c097

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/Sema/SemaDecl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11916,6 +11916,10 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD,
1191611916
if (NewTA && S.getASTContext().getTargetInfo().getTriple().isAArch64())
1191711917
return false;
1191811918

11919+
// Target attribute on RISCV is not used for multiversioning
11920+
if (NewTA && S.getASTContext().getTargetInfo().getTriple().isRISCV())
11921+
return false;
11922+
1191911923
if (!OldDecl || !OldDecl->getAsFunction() ||
1192011924
OldDecl->getDeclContext()->getRedeclContext() !=
1192111925
NewFD->getDeclContext()->getRedeclContext()) {

0 commit comments

Comments
 (0)