[clang] [RISCV] Disallow target attribute use in multiversioning (PR #85899)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 1 23:26:33 PDT 2024


================
@@ -11853,6 +11853,10 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD,
   if (NewTA && S.getASTContext().getTargetInfo().getTriple().isAArch64())
     return false;
 
+  // Target attribute on RISCV is not used for multiversioning
+  if (NewTA && S.getASTContext().getTargetInfo().getTriple().isRISCV())
----------------
topperc wrote:

Can we share `S.getASTContext().getTargetInfo().getTriple()` with AArch64

https://github.com/llvm/llvm-project/pull/85899


More information about the cfe-commits mailing list