diff options
Diffstat (limited to 'lld/test/wasm/signature-mismatch-weak.ll')
-rw-r--r-- | lld/test/wasm/signature-mismatch-weak.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lld/test/wasm/signature-mismatch-weak.ll b/lld/test/wasm/signature-mismatch-weak.ll new file mode 100644 index 00000000000..47a8359aa5d --- /dev/null +++ b/lld/test/wasm/signature-mismatch-weak.ll @@ -0,0 +1,19 @@ +; RUN: llc -filetype=obj %p/Inputs/weak-symbol1.ll -o %t.weak.o +; RUN: llc -filetype=obj %p/Inputs/strong-symbol.ll -o %t.strong.o +; RUN: llc -filetype=obj %s -o %t.o +; RUN: not wasm-ld --check-signatures -o %t.wasm %t.o %t.strong.o %t.weak.o 2>&1 | FileCheck %s +; RUN: wasm-ld -o %t.wasm %t.o %t.strong.o %t.weak.o + +target triple = "wasm32-unknown-unknown-wasm" + +declare i32 @weakFn() local_unnamed_addr + +define void @_start() local_unnamed_addr { +entry: + %call = call i32 @weakFn() + ret void +} + +; CHECK: error: function signature mismatch: weakFn +; CHECK-NEXT: >>> defined as () -> I32 in {{.*}}signature-mismatch-weak.ll.tmp.o +; CHECK-NEXT: >>> defined as () -> I64 in {{.*}}signature-mismatch-weak.ll.tmp.strong.o |