summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-11-13 14:29:36 -0500
committerGitHub <noreply@github.com>2024-11-13 11:29:36 -0800
commit24c81824c1d80c398c6adb27decc28048c5e8029 (patch)
tree2a0851a5311a18ee0a358867b4a365d86bf42019 /test
parent24b5bdfd1bf550dae38a7a990379b315d9f11bae (diff)
downloadbinaryen-24c81824c1d80c398c6adb27decc28048c5e8029.tar.gz
binaryen-24c81824c1d80c398c6adb27decc28048c5e8029.tar.bz2
binaryen-24c81824c1d80c398c6adb27decc28048c5e8029.zip
Read the names section first (#7074)
Rather than back-patching names when we get to the names section in the binary reader, skip ahead to read the names section before anything else so we can use the final names right away. This is a prerequisite for using IRBuilder in the binary reader. The only functional change is that we now allow empty local names. Empty names are perfectly valid.
Diffstat (limited to 'test')
-rw-r--r--test/lit/binary/empty-param-name.test9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/lit/binary/empty-param-name.test b/test/lit/binary/empty-param-name.test
index 2216d0bbb..aa89f3afc 100644
--- a/test/lit/binary/empty-param-name.test
+++ b/test/lit/binary/empty-param-name.test
@@ -1,4 +1,5 @@
-;; Test that we show a warning on an empty local name, and do not crash.
+;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
+;; Test that we handle an empty local name, and do not crash.
;;
;; The binary contains this, processed by wabt with debug names:
;;
@@ -8,7 +9,7 @@
;; Wabt emits a name for that parameter, but it is the empty string. See
;; https://github.com/WebAssembly/wabt/issues/1799
-;; RUN: wasm-opt %s.wasm 2>&1 | filecheck %s
-
-;; CHECK: warning: empty local name at index 0 in function foo
+;; RUN: wasm-opt %s.wasm -S -o - | filecheck %s
+;; CHECK: (type $0 (func (param i32)))
+;; CHECK: (import "imports" "foo" (func $foo (param $"" i32)))