summaryrefslogtreecommitdiff
path: root/src/wasm-builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r--src/wasm-builder.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index f9b2e73f6..546d72391 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -339,6 +339,12 @@ public:
input->finalize();
return ret;
}
+
+ // Drop an expression if it has a concrete type
+ Expression* dropIfConcretelyTyped(Expression* curr) {
+ if (!isConcreteWasmType(curr->type)) return curr;
+ return makeDrop(curr);
+ }
};
} // namespace wasm