summaryrefslogtreecommitdiffstats
path: root/lld/test/wasm/signature-mismatch-weak.ll
blob: 8123b609a8b7534e4161b8439cf17b89cd3c1ebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; 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: wasm-ld -o %t.wasm %t.o %t.strong.o %t.weak.o 2>&1 | FileCheck %s

target triple = "wasm32-unknown-unknown"

declare i32 @weakFn() local_unnamed_addr

define void @_start() local_unnamed_addr {
entry:
  %call = call i32 @weakFn()
  ret void
}

; CHECK: warning: Function type 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
OpenPOWER on IntegriCloud