diff options
author | Thomas Lively <tlively@google.com> | 2024-02-07 17:34:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-07 17:34:47 -0800 |
commit | 0724babd6c1b7fa5891f1de2cc60228734bc4395 (patch) | |
tree | 278b08fb50e53181043b70f96f4acabd67bf71e7 /test | |
parent | 4e0796d022fcd48c8af5a8a709577ce495bca991 (diff) | |
download | binaryen-0724babd6c1b7fa5891f1de2cc60228734bc4395.tar.gz binaryen-0724babd6c1b7fa5891f1de2cc60228734bc4395.tar.bz2 binaryen-0724babd6c1b7fa5891f1de2cc60228734bc4395.zip |
[Parser] Do not involve IRBuilder for imported functions (#6286)
We previously had a bug where we would begin and end an IRBuilder context for
imported functions even though they don't have bodies. For functions that return
results, ending this empty scope should have produced an error except that we
had another bug where we only produced that error for multivalue functions. We
did not previously have imported multivalue functions in wat-kitchen-sink.wast,
so both of these bugs went undetected. Fix both bugs and update the test to
include an imported multivalue function so that it would have failed without
this fix.
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/wat-kitchen-sink.wast | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lit/wat-kitchen-sink.wast b/test/lit/wat-kitchen-sink.wast index 32a70d913..7dea0d3c2 100644 --- a/test/lit/wat-kitchen-sink.wast +++ b/test/lit/wat-kitchen-sink.wast @@ -271,7 +271,7 @@ ;; imported functions (func (export "f5.0") (export "f5.1") (import "mod" "f5")) - (import "mod" "imported-f" (func (param) (result))) + (import "mod" "imported-f" (func (param) (result i32 i64))) ;; imported tags (tag $imported (export "t0.0") (export "t0.1") (import "mod" "t0") (param i32 i64)) @@ -283,7 +283,7 @@ ;; CHECK: (import "mod" "f5" (func $fimport$0 (type $void))) - ;; CHECK: (import "mod" "imported-f" (func $fimport$1 (type $void))) + ;; CHECK: (import "mod" "imported-f" (func $fimport$1 (type $3) (result i32 i64))) ;; CHECK: (import "mod" "t0" (tag $imported (param i32 i64))) |