diff options
-rw-r--r-- | src/ir/ty.rs | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/ir/ty.rs b/src/ir/ty.rs index c1ed5b64..1e87beb4 100644 --- a/src/ir/ty.rs +++ b/src/ir/ty.rs @@ -914,13 +914,24 @@ impl TypeCollector for Type { TypeKind::Function(ref sig) => { sig.collect_types(context, types, item) } - TypeKind::Named(_) => {} - // FIXME: Pending types! - ref other @ _ => { - debug!("<Type as TypeCollector>::collect_types: Ignoring: \ - {:?}", - other); + TypeKind::Enum(ref en) => { + if let Some(repr) = en.repr() { + types.insert(repr); + } + } + TypeKind::UnresolvedTypeRef(_, _, Some(id)) => { + types.insert(id); } + + // None of these variants have edges to other items and types. + TypeKind::UnresolvedTypeRef(_, _, None) | + TypeKind::Named(_) | + TypeKind::Void | + TypeKind::NullPtr | + TypeKind::Int(_) | + TypeKind::Float(_) | + TypeKind::Complex(_) | + TypeKind::BlockPointer => {} } } } |