• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -filetype=obj %s -o - | llvm-readobj -s | FileCheck %s
2
3target triple = "wasm32-unknown-unknown"
4
5; external function
6declare i32 @a()
7
8; global data
9@b = global i32 3, align 4
10
11; local function
12define i32 @f1() {
13entry:
14    %tmp1 = call i32 @a()
15    ret i32 %tmp1
16}
17
18; CHECK: Format: WASM
19; CHECK: Arch: wasm32
20; CHECK: AddressSize: 32bit
21; CHECK: Sections [
22; CHECK:   Section {
23; CHECK:     Type: TYPE (0x1)
24; CHECK:   }
25; CHECK:  Section {
26; CHECK:    Type: IMPORT (0x2)
27; CHECK:  }
28; CHECK:  Section {
29; CHECK:    Type: FUNCTION (0x3)
30; CHECK:  }
31; CHECK:  Section {
32; CHECK:    Type: CODE (0xA)
33; CHECK:  }
34; CHECK:  Section {
35; CHECK:    Type: DATA (0xB)
36; CHECK:  }
37; CHECK:  Section {
38; CHECK:    Type: CUSTOM (0x0)
39; CHECK:    Name: reloc.CODE
40; CHECK:  }
41; CHECK:]
42
43