summaryrefslogtreecommitdiff
path: root/test/lld
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2021-04-16 17:55:35 -0700
committerGitHub <noreply@github.com>2021-04-16 17:55:35 -0700
commitda4e17d827c444bbbcceb08d577c528020d4d959 (patch)
tree7b979220507d3d7273f3fb864da50eb5ca8f3db1 /test/lld
parent423cf0b890e44356fbfa80c5bdfd4032fcc1da01 (diff)
downloadbinaryen-da4e17d827c444bbbcceb08d577c528020d4d959.tar.gz
binaryen-da4e17d827c444bbbcceb08d577c528020d4d959.tar.bz2
binaryen-da4e17d827c444bbbcceb08d577c528020d4d959.zip
LegalizeJSInterface: Remove illegal imports once they are no longer used (#3815)
This prevents used imports which also happen to have duplicate names and therefore cannot be provided by wasm (JS is happen to fill these in with polymorphic JS functions). I noticed this when working on emscripten and directly hooking modules together. I was seeing failures, but not in release builds (because wasm-opt would mop these up in release builds).
Diffstat (limited to 'test/lld')
-rw-r--r--test/lld/duplicate_imports.wat.out3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/lld/duplicate_imports.wat.out b/test/lld/duplicate_imports.wat.out
index 221592373..3160d1dc2 100644
--- a/test/lld/duplicate_imports.wat.out
+++ b/test/lld/duplicate_imports.wat.out
@@ -1,15 +1,14 @@
(module
- (type $i64_=>_i32 (func (param i64) (result i32)))
(type $i32_f32_f64_=>_f32 (func (param i32 f32 f64) (result f32)))
(type $i32_f64_f64_=>_f32 (func (param i32 f64 f64) (result f32)))
(type $2 (func))
(type $1 (func (result i32)))
(type $0 (func (param i32) (result i32)))
+ (type $i64_=>_i32 (func (param i64) (result i32)))
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
(type $f32_f64_=>_f32 (func (param f32 f64) (result f32)))
(type $f64_f64_=>_f32 (func (param f64 f64) (result f32)))
(import "env" "puts" (func $puts1 (param i32) (result i32)))
- (import "env" "puts" (func $puts2 (param i64) (result i32)))
(import "env" "invoke_ffd" (func $invoke_ffd (param i32 f32 f64) (result f32)))
(import "env" "invoke_ffd" (func $invoke_ffd2 (param i32 f64 f64) (result f32)))
(import "env" "puts" (func $legalimport$puts2 (param i32 i32) (result i32)))