summaryrefslogtreecommitdiff
path: root/test/lit/wasm-emscripten-finalize
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2022-05-26 18:55:57 -0700
committerGitHub <noreply@github.com>2022-05-26 18:55:57 -0700
commit590af8639ab4f6cfd82452b5ff2b431b470c64a5 (patch)
tree26970ab74c936d4aff1a445f4c36a4aaf3e5f2e9 /test/lit/wasm-emscripten-finalize
parent626132d69687dd4d04062009aac9b14a3d5b7738 (diff)
downloadbinaryen-590af8639ab4f6cfd82452b5ff2b431b470c64a5.tar.gz
binaryen-590af8639ab4f6cfd82452b5ff2b431b470c64a5.tar.bz2
binaryen-590af8639ab4f6cfd82452b5ff2b431b470c64a5.zip
[EH] Export tags (#4691)
This adds exported tags to `exports` section in wasm-emscripten-finalize metadata so Emscripten can use it. Also fixes a bug in the parser. We have only recognized the export format of ```wasm (tag $e2 (param f32)) (export "e2" (tag $e2)) ``` and ignored this format: ```wasm (tag $e1 (export "e1") (param i32)) ``` Companion patch: https://github.com/emscripten-core/emscripten/pull/17064
Diffstat (limited to 'test/lit/wasm-emscripten-finalize')
-rw-r--r--test/lit/wasm-emscripten-finalize/tag_export.wat12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lit/wasm-emscripten-finalize/tag_export.wat b/test/lit/wasm-emscripten-finalize/tag_export.wat
new file mode 100644
index 000000000..86c8c1331
--- /dev/null
+++ b/test/lit/wasm-emscripten-finalize/tag_export.wat
@@ -0,0 +1,12 @@
+;; RUN: wasm-emscripten-finalize %s | filecheck %s
+
+(module
+ (tag $e1 (export "e1") (param i32))
+ (tag $e2 (param f32))
+ (export "e2" (tag $e2))
+)
+
+;; CHECK: "exports": [
+;; CHECK: "e1",
+;; CHECK: "e2"
+;; CHECK: ],