Skip to content

Commit e6377b2

Browse files
committed
ast-exporter: Accept Float16 like Half
Float16 builtins appear as a consequence of converting RISCV vector types to normal vector types. Closes: #692
1 parent 3c9bc41 commit e6377b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

c2rust-ast-exporter/src/AstExporter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@ class TypeEncoder final : public TypeVisitor<TypeEncoder> {
400400
case BuiltinType::UInt: return TagUInt;
401401
case BuiltinType::ULong: return TagULong;
402402
case BuiltinType::ULongLong: return TagULongLong;
403+
// Constructed as a consequence of the conversion of
404+
// built-in to normal vector types.
405+
case BuiltinType::Float16: return TagHalf;
403406
case BuiltinType::Half: return TagHalf;
404407
#if CLANG_VERSION_MAJOR >= 11
405408
case BuiltinType::BFloat16: return TagBFloat16;

0 commit comments

Comments
 (0)