2018-01-24 11:29:47 +08:00
|
|
|
; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
|
|
|
|
; RUN: llc -filetype=obj %s -o %t.main.o
|
2018-06-22 23:13:10 +08:00
|
|
|
; RUN: not wasm-ld --fatal-warnings -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s
|
2018-02-17 03:45:41 +08:00
|
|
|
; 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.
|
2018-06-22 23:13:10 +08:00
|
|
|
; RUN: not wasm-ld --fatal-warnings -o %t.wasm %t.ret32.o %t.main.o 2>&1 | FileCheck %s -check-prefix=REVERSE
|
2017-11-30 09:40:08 +08:00
|
|
|
|
2018-05-11 01:59:41 +08:00
|
|
|
target triple = "wasm32-unknown-unknown"
|
2018-01-24 11:29:47 +08:00
|
|
|
|
2017-11-30 09:40:08 +08:00
|
|
|
; Function Attrs: nounwind
|
|
|
|
define hidden void @_start() local_unnamed_addr #0 {
|
|
|
|
entry:
|
|
|
|
%call = tail call i32 @ret32(i32 1, i64 2, i32 3) #2
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i32 @ret32(i32, i64, i32) local_unnamed_addr #1
|
|
|
|
|
2018-06-22 23:13:10 +08:00
|
|
|
; CHECK: error: function signature mismatch: ret32
|
2018-11-01 09:08:37 +08:00
|
|
|
; CHECK-NEXT: >>> defined as (i32, i64, i32) -> i32 in {{.*}}.main.o
|
|
|
|
; CHECK-NEXT: >>> defined as (f32) -> i32 in {{.*}}.ret32.o
|
2018-06-21 08:12:25 +08:00
|
|
|
|
2018-06-22 23:13:10 +08:00
|
|
|
; REVERSE: error: function signature mismatch: ret32
|
2018-11-01 09:08:37 +08:00
|
|
|
; REVERSE-NEXT: >>> defined as (f32) -> i32 in {{.*}}.ret32.o
|
|
|
|
; REVERSE-NEXT: >>> defined as (i32, i64, i32) -> i32 in {{.*}}.main.o
|