Skip to content

Commit b2897b8

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 c6caa8a commit b2897b8

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 consequence of the conversion of built-in vector
404+
// types 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)