• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -filetype=obj -o %t.o %s
2; RUN: llvm-as %S/Inputs/archive.ll -o %t1.o
3; RUN: not wasm-ld --fatal-warnings %t.o %t1.o -o %t.wasm 2>&1 | FileCheck %s
4
5; Test that functions defined in bitcode correctly report signature
6; mismatches with existing undefined sybmols in normal objects.
7
8target triple = "wasm32-unknown-unknown"
9
10; f is defined to take no argument in archive.ll which is compiled to bitcode
11declare void @f(i32);
12
13define void @_start() {
14  call void @f(i32 0)
15  ret void
16}
17
18; CHECK: error: function signature mismatch: f
19; CHECK: >>> defined as (i32) -> void in {{.*}}signature-mismatch.ll.tmp1.o
20; CHECK: >>> defined as () -> void in lto.tmp
21