1 ; RUN: llc -filetype=obj %s -o - | llvm-readobj --symbols - | FileCheck %s
2 ; RUN: llc -filetype=obj %s -mattr=+reference-types -o - | llvm-readobj --symbols - | FileCheck --check-prefix=REF %s
4 target triple = "wasm32-unknown-unknown-wasm"
6 @foo = alias i8, ptr @func
7 @bar = alias ptr (), ptr @func
8 @bar2 = alias ptr (), ptr @bar
16 ; CHECK-NEXT: Symbol {
17 ; CHECK-NEXT: Name: func
18 ; CHECK-NEXT: Type: FUNCTION (0x0)
19 ; CHECK-NEXT: Flags [ (0x0)
21 ; CHECK-NEXT: ElementIndex: 0x0
23 ; CHECK-NEXT: Symbol {
24 ; CHECK-NEXT: Name: bar2
25 ; CHECK-NEXT: Type: FUNCTION (0x0)
26 ; CHECK-NEXT: Flags [ (0x0)
28 ; CHECK-NEXT: ElementIndex: 0x0
30 ; CHECK-NEXT: Symbol {
31 ; CHECK-NEXT: Name: foo
32 ; CHECK-NEXT: Type: FUNCTION (0x0)
33 ; CHECK-NEXT: Flags [ (0x0)
35 ; CHECK-NEXT: ElementIndex: 0x0
37 ; CHECK-NEXT: Symbol {
38 ; CHECK-NEXT: Name: bar
39 ; CHECK-NEXT: Type: FUNCTION (0x0)
40 ; CHECK-NEXT: Flags [ (0x0)
42 ; CHECK-NEXT: ElementIndex: 0x0
48 ; REF-NEXT: Name: func
49 ; REF-NEXT: Type: FUNCTION (0x0)
50 ; REF-NEXT: Flags [ (0x0)
52 ; REF-NEXT: ElementIndex: 0x0
55 ; REF-NEXT: Name: bar2
56 ; REF-NEXT: Type: FUNCTION (0x0)
57 ; REF-NEXT: Flags [ (0x0)
59 ; REF-NEXT: ElementIndex: 0x0
63 ; REF-NEXT: Type: FUNCTION (0x0)
64 ; REF-NEXT: Flags [ (0x0)
66 ; REF-NEXT: ElementIndex: 0x0
70 ; REF-NEXT: Type: FUNCTION (0x0)
71 ; REF-NEXT: Flags [ (0x0)
73 ; REF-NEXT: ElementIndex: 0x0
76 ; REF-NEXT: Name: __indirect_function_table
77 ; REF-NEXT: Type: TABLE (0x5)
78 ; REF-NEXT: Flags [ (0x90)
79 ; REF-NEXT: NO_STRIP (0x80)
80 ; REF-NEXT: UNDEFINED (0x10)
82 ; REF-NEXT: ImportModule: env
83 ; REF-NEXT: ElementIndex: 0x0