Skip to content

Commit 3717147

Browse files
authored
[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.
1 parent 8b356f4 commit 3717147

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/Sema.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2071,7 +2071,7 @@ void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {
20712071
targetDiag(D->getLocation(), diag::note_defined_here, FD) << D;
20722072
}
20732073

2074-
if (Ty->isRVVType())
2074+
if (TI.hasRISCVVTypes() && Ty->isRVVType())
20752075
checkRVVTypeSupport(Ty, Loc, D);
20762076

20772077
// Don't allow SVE types in functions without a SVE target.

0 commit comments

Comments
 (0)