Skip to content

Commit d40f9d4

Browse files
committed
go
1 parent 6c70e2c commit d40f9d4

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/ir/module-utils.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,14 @@ struct TypeInfos {
363363
}
364364
}
365365
void note(Type type) {
366+
if (type.isNumber() || type.getID() == Type::none ||
367+
type.getID() == Type::unreachable) {
368+
return;
369+
}
370+
if (type.isRef()) {
371+
note(type.getHeapType());
372+
return;
373+
}
366374
for (HeapType ht : type.getHeapTypeChildren()) {
367375
note(ht);
368376
}
@@ -374,6 +382,14 @@ struct TypeInfos {
374382
}
375383
}
376384
void include(Type type) {
385+
if (type.isNumber() || type.getID() == Type::none ||
386+
type.getID() == Type::unreachable) {
387+
return;
388+
}
389+
if (type.isRef()) {
390+
include(type.getHeapType());
391+
return;
392+
}
377393
for (HeapType ht : type.getHeapTypeChildren()) {
378394
include(ht);
379395
}

0 commit comments

Comments
 (0)