Skip to content

Commit 7bee8e4

Browse files
committed
[CHERIoT] Use a target feature test rather than subarch test for CHERIoT in the static analyzer.
1 parent a968d66 commit 7bee8e4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/StaticAnalyzer/Checkers/CHERI/SubObjectRepresentabilityChecker.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ SubObjectRepresentabilityChecker::getCheckFieldFn(ASTContext &ASTCtx) const {
163163
return nullptr;
164164

165165
const auto &T = TI.getTriple();
166-
if (T.getArch() == llvm::Triple::riscv32 &&
167-
T.getSubArch() == llvm::Triple::RISCV32SubArch_cheriot_v1) {
166+
if (T.getArch() == llvm::Triple::riscv32 && TI.hasFeature("xcheriot")) {
168167
return &checkFieldImpl<llvm::CompressedCapability::Cheriot64>;
169168
}
170169

0 commit comments

Comments
 (0)