diff options
Diffstat (limited to 'test/lit/wasm-split')
-rw-r--r-- | test/lit/wasm-split/help.test | 2 | ||||
-rw-r--r-- | test/lit/wasm-split/placeholdermap.wast | 24 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/lit/wasm-split/help.test b/test/lit/wasm-split/help.test index de789a362..8159e66db 100644 --- a/test/lit/wasm-split/help.test +++ b/test/lit/wasm-split/help.test @@ -34,6 +34,8 @@ CHECK-NEXT: --secondary-output,-o2 [split] Output file for the s CHECK-NEXT: module. CHECK-NEXT: --symbolmap [split] Write a symbol map file for each CHECK-NEXT: of the output modules. +CHECK-NEXT: --placeholdermap [split] Write a file mapping placeholder +CHECK-NEXT: indices to the function names. CHECK-NEXT: --import-namespace [split] The namespace from which to CHECK-NEXT: import objects from the primary module CHECK-NEXT: into the secondary module. diff --git a/test/lit/wasm-split/placeholdermap.wast b/test/lit/wasm-split/placeholdermap.wast new file mode 100644 index 000000000..dd8598b0b --- /dev/null +++ b/test/lit/wasm-split/placeholdermap.wast @@ -0,0 +1,24 @@ +;; RUN: wasm-split %s --keep-funcs=bar -o1 %t.1.wasm -o2 %t.2.wasm --placeholdermap +;; RUN: filecheck %s --check-prefix MAP < %t.1.wasm.placeholders +;; RUN: wasm-dis %t.1.wasm | filecheck %s --check-prefix PRIMARY + +;; MAP: 0:foo +;; MAP-NEXT: 2:baz +;; MAP-NOT: bar + +;; Check that the names have been stripped. +;; PRIMARY: (func $0 + +(module + (table $table 3 3 funcref) + (elem $table (i32.const 0) $foo $bar $baz) + (func $foo + (nop) + ) + (func $bar + (nop) + ) + (func $baz + (nop) + ) +) |