summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ir/literal-utils.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/ir/literal-utils.h b/src/ir/literal-utils.h
index 0131ecdc9..58f8fe8fe 100644
--- a/src/ir/literal-utils.h
+++ b/src/ir/literal-utils.h
@@ -29,19 +29,7 @@ inline Expression* makeFromInt32(int32_t x, Type type, Module& wasm) {
return ret;
}
-inline bool canMakeZero(Type type) {
- if (type.isNonNullable()) {
- return false;
- }
- if (type.isTuple()) {
- for (auto t : type) {
- if (t.isNonNullable()) {
- return false;
- }
- }
- }
- return true;
-}
+inline bool canMakeZero(Type type) { return type.isDefaultable(); }
inline Expression* makeZero(Type type, Module& wasm) {
assert(canMakeZero(type));