1 target triple = "wasm32-unknown-unknown"
3 ; Function Attrs: norecurse nounwind readnone
4 define i32 @direct_fn() #0 {
9 @alias_fn = weak alias i32 (), ptr @direct_fn
11 define i32 @call_direct() #0 {
13 %call = call i32 @direct_fn()
17 define i32 @call_alias() #0 {
19 %call = call i32 @alias_fn()
23 define i32 @call_alias_ptr() #0 {
25 %fnptr = alloca ptr, align 8
26 store ptr @alias_fn, ptr %fnptr, align 8
27 %0 = load ptr, ptr %fnptr, align 8
32 define i32 @call_direct_ptr() #0 {
34 %fnptr = alloca ptr, align 8
35 store ptr @direct_fn, ptr %fnptr, align 8
36 %0 = load ptr, ptr %fnptr, align 8