llvm-project
35 строк · 969.0 Байт
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2# RUN: wasm-ld %t.o -o %t.wasm
3# RUN: obj2yaml %t.wasm | FileCheck %s
4
5.functype foo () -> ()
6.functype bar () -> ()
7.functype _start () -> ()
8.globl foo
9.type foo,@function
10foo:
11.functype foo () -> ()
12end_function
13
14.section .text.bar,"",@
15.globl bar
16.type bar,@function
17bar:
18.functype bar () -> ()
19end_function
20
21.globl _start
22.type _start,@function
23_start:
24.functype _start () -> ()
25call foo
26call bar
27end_function
28
29.section .custom_section.llvm.func_attr.custom0,"",@
30.int32 foo@FUNCINDEX
31.int32 bar@FUNCINDEX
32
33# CHECK: - Type: CUSTOM
34# CHECK-NEXT: Name: llvm.func_attr.custom0
35# CHECK-NEXT: Payload: '0000000001000000'
36