Skip to content

Commit

Permalink
ast-exporter: Accept Float16 like Half
Browse files Browse the repository at this point in the history
Float16 builtins appear as a consequence of converting RISCV vector
types to normal vector types.

Closes: #692
  • Loading branch information
chrysn committed Sep 28, 2022
1 parent c6caa8a commit b2897b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions c2rust-ast-exporter/src/AstExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,9 @@ class TypeEncoder final : public TypeVisitor<TypeEncoder> {
case BuiltinType::UInt: return TagUInt;
case BuiltinType::ULong: return TagULong;
case BuiltinType::ULongLong: return TagULongLong;
// Constructed as consequence of the conversion of built-in vector
// types to normal vector types
case BuiltinType::Float16: return TagHalf;
case BuiltinType::Half: return TagHalf;
#if CLANG_VERSION_MAJOR >= 11
case BuiltinType::BFloat16: return TagBFloat16;
Expand Down

0 comments on commit b2897b8

Please sign in to comment.