diff options
Diffstat (limited to 'test/wasm/signature-mismatch.ll')
| -rw-r--r-- | test/wasm/signature-mismatch.ll | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/wasm/signature-mismatch.ll b/test/wasm/signature-mismatch.ll index 842b8289afd9..d750d4f6b359 100644 --- a/test/wasm/signature-mismatch.ll +++ b/test/wasm/signature-mismatch.ll @@ -1,6 +1,12 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.main.o -; RUN: not lld -flavor wasm --check-signatures -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s +; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o +; RUN: llc -filetype=obj %s -o %t.main.o +; RUN: not wasm-ld --fatal-warnings -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s +; Run the test again by with the object files in the other order to verify +; the check works when the undefined symbol is resolved by an existing defined +; one. +; RUN: not wasm-ld --fatal-warnings -o %t.wasm %t.ret32.o %t.main.o 2>&1 | FileCheck %s -check-prefix=REVERSE + +target triple = "wasm32-unknown-unknown" ; Function Attrs: nounwind define hidden void @_start() local_unnamed_addr #0 { @@ -14,3 +20,7 @@ declare i32 @ret32(i32, i64, i32) local_unnamed_addr #1 ; CHECK: error: function signature mismatch: ret32 ; CHECK-NEXT: >>> defined as (I32, I64, I32) -> I32 in {{.*}}.main.o ; CHECK-NEXT: >>> defined as (F32) -> I32 in {{.*}}.ret32.o + +; REVERSE: error: function signature mismatch: ret32 +; REVERSE-NEXT: >>> defined as (F32) -> I32 in {{.*}}.ret32.o +; REVERSE-NEXT: >>> defined as (I32, I64, I32) -> I32 in {{.*}}.main.o |
