Skip to content

Commit d6e800d

Browse files
committed
fixup! ast-exporter: Guard RISCV types introduced in LLVM 13
1 parent 2167929 commit d6e800d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

c2rust-ast-exporter/src/AstExporter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,10 @@ class TypeEncoder final : public TypeVisitor<TypeEncoder> {
323323

324324
#if CLANG_VERSION_MAJOR >= 10
325325
// Handle built-in vector types as if they're normal vector types
326-
if (kind >= BuiltinType::SveInt8 && kind <= BuiltinType::SveBool ||
326+
if (kind >= BuiltinType::SveInt8 && kind <= BuiltinType::SveBool
327327
#if CLANG_VERSION_MAJOR >= 13
328328
/* RISC-V vector types */
329-
kind >= clang::BuiltinType::RvvInt8mf8 && kind <= clang::BuiltinType::RvvBool64
329+
|| kind >= clang::BuiltinType::RvvInt8mf8 && kind <= clang::BuiltinType::RvvBool64
330330
#endif // CLANG_VERSION_MAJOR >= 13
331331
) {
332332
// Declare ElemType and ElemCount as needed by various Clang versions

0 commit comments

Comments
 (0)