diff options
Diffstat (limited to 'src/ir/module-utils.h')
-rw-r--r-- | src/ir/module-utils.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ir/module-utils.h b/src/ir/module-utils.h index 0095fb407..f33d41266 100644 --- a/src/ir/module-utils.h +++ b/src/ir/module-utils.h @@ -405,7 +405,10 @@ inline void collectHeapTypes(Module& wasm, std::unordered_map<HeapType, Index>& typeIndices) { struct Counts : public std::unordered_map<HeapType, size_t> { bool isRelevant(Type type) { - return !type.isBasic() && (type.isRef() || type.isRtt()); + if (type.isRef()) { + return !type.getHeapType().isBasic(); + } + return type.isRtt(); } void note(HeapType type) { (*this)[type]++; } void maybeNote(Type type) { |