Skip to content

Commit

Permalink
fixup! ast-exporter: Guard RISCV types introduced in LLVM 13
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Sep 28, 2022
1 parent 2167929 commit d6e800d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions c2rust-ast-exporter/src/AstExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,10 @@ class TypeEncoder final : public TypeVisitor<TypeEncoder> {

#if CLANG_VERSION_MAJOR >= 10
// Handle built-in vector types as if they're normal vector types
if (kind >= BuiltinType::SveInt8 && kind <= BuiltinType::SveBool ||
if (kind >= BuiltinType::SveInt8 && kind <= BuiltinType::SveBool
#if CLANG_VERSION_MAJOR >= 13
/* RISC-V vector types */
kind >= clang::BuiltinType::RvvInt8mf8 && kind <= clang::BuiltinType::RvvBool64
|| kind >= clang::BuiltinType::RvvInt8mf8 && kind <= clang::BuiltinType::RvvBool64
#endif // CLANG_VERSION_MAJOR >= 13
) {
// Declare ElemType and ElemCount as needed by various Clang versions
Expand Down

0 comments on commit d6e800d

Please sign in to comment.