Skip to content

Commit b9a2a5e

Browse files
committed
Share Triple for AArch64 and RISCV
1 parent e6b7a2d commit b9a2a5e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/lib/Sema/SemaDecl.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11912,12 +11912,14 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD,
1191211912
return false;
1191311913
}
1191411914

11915+
const llvm::Triple &T = S.getASTContext().getTargetInfo().getTriple();
11916+
1191511917
// Target attribute on AArch64 is not used for multiversioning
11916-
if (NewTA && S.getASTContext().getTargetInfo().getTriple().isAArch64())
11918+
if (NewTA && T.isAArch64())
1191711919
return false;
1191811920

1191911921
// Target attribute on RISCV is not used for multiversioning
11920-
if (NewTA && S.getASTContext().getTargetInfo().getTriple().isRISCV())
11922+
if (NewTA && T.isRISCV())
1192111923
return false;
1192211924

1192311925
if (!OldDecl || !OldDecl->getAsFunction() ||

0 commit comments

Comments
 (0)