Author: Timm Baeder Date: 2023-10-06T09:56:05+02:00 New Revision: 3717147ee6e41f7fa3225c318104982499c5c505
URL: https://github.com/llvm/llvm-project/commit/3717147ee6e41f7fa3225c318104982499c5c505 DIFF: https://github.com/llvm/llvm-project/commit/3717147ee6e41f7fa3225c318104982499c5c505.diff LOG: [clang][Sema] Only check RVV types if we have them (#67669) isRVVType() is suprisingly expensive, so do the checks only if the target has rvv types. Added: Modified: clang/lib/Sema/Sema.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index db81fa645a27ffd..67533ccbdf347c7 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -2071,7 +2071,7 @@ void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { targetDiag(D->getLocation(), diag::note_defined_here, FD) << D; } - if (Ty->isRVVType()) + if (TI.hasRISCVVTypes() && Ty->isRVVType()) checkRVVTypeSupport(Ty, Loc, D); // Don't allow SVE types in functions without a SVE target. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits