Skip to content

Commit 42a431e

Browse files
committed
Implement more type kinds
1 parent ab7d138 commit 42a431e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/type_.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,19 @@ impl<'gcc, 'tcx> BaseTypeMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
170170
TypeKind::Double
171171
} else if typ.is_vector() {
172172
TypeKind::Vector
173+
} else if typ.get_pointee().is_some() {
174+
TypeKind::Pointer
175+
} else if typ.dyncast_array().is_some() {
176+
TypeKind::Array
177+
} else if typ.is_struct().is_some() {
178+
TypeKind::Struct
179+
} else if typ.dyncast_function_ptr_type().is_some() {
180+
TypeKind::Function
181+
} else if typ == self.type_void() {
182+
TypeKind::Void
173183
} else {
174184
// TODO(antoyo): support other types.
175-
TypeKind::Void
185+
unimplemented!();
176186
}
177187
}
178188

0 commit comments

Comments
 (0)