brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · e2c942f Raw
58 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o2# RUN: wasm-ld -o %t1.wasm %t.o3# RUN: obj2yaml %t1.wasm | FileCheck %s4 5.globl f16.import_module f1, env7.import_name f1, f8.functype f1 () -> (i32)9 10# Same import module/name/type as `f1`, should be de-duped.11.globl f212.import_module f2, env13.import_name f2, f14.functype f2 () -> (i32)15 16# Same import module/name, but different type. Should not be de-duped.17.globl f318.import_module f3, env19.import_name f3, f20.functype f3 () -> (f32)21 22.globl _start23_start:24  .functype _start () -> ()25  call f126  drop27  call f228  drop29  call f330  drop31  end_function32 33 34# CHECK:        - Type:            TYPE35# CHECK-NEXT:     Signatures:36# CHECK-NEXT:       - Index:           037# CHECK-NEXT:         ParamTypes:      []38# CHECK-NEXT:         ReturnTypes:39# CHECK-NEXT:           - I3240# CHECK-NEXT:       - Index:           141# CHECK-NEXT:         ParamTypes:      []42# CHECK-NEXT:         ReturnTypes:43# CHECK-NEXT:           - F3244# CHECK-NEXT:       - Index:           245# CHECK-NEXT:         ParamTypes:      []46# CHECK-NEXT:         ReturnTypes:     []47# CHECK-NEXT:   - Type:            IMPORT48# CHECK-NEXT:     Imports:49# CHECK-NEXT:       - Module:          env50# CHECK-NEXT:         Field:           f51# CHECK-NEXT:         Kind:            FUNCTION52# CHECK-NEXT:         SigIndex:        053# CHECK-NEXT:       - Module:          env54# CHECK-NEXT:         Field:           f55# CHECK-NEXT:         Kind:            FUNCTION56# CHECK-NEXT:         SigIndex:        157# CHECK-NEXT:   - Type:58