1 ; RUN: llc -O0 -filetype=obj %s -o %t.o
3 ; RUN: wasm-ld -o %t.wasm %t.o
4 ; RUN: obj2yaml %t.wasm | FileCheck %s
6 ; RUN: wasm-ld --export-all -o %t.wasm %t.o
7 ; RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=EXPORT
9 ; RUN: wasm-ld --export-all --no-gc-sections -o %t.wasm %t.o
10 ; RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=EXPORT
12 ; Verify the --export-all flag exports hidden symbols
14 target triple = "wasm32-unknown-unknown"
16 define internal void @internal_func() local_unnamed_addr {
21 define hidden void @bar() local_unnamed_addr {
26 define hidden void @foo() local_unnamed_addr {
31 define hidden void @_start() local_unnamed_addr {
34 call void @internal_func()
38 ; CHECK: - Type: EXPORT
39 ; CHECK: - Name: _start
40 ; CHECK-NOT: - Name: bar
41 ; CHECK-NOT: - Name: foo
42 ; CHECK-NOT: - Name: internal_func
44 ; EXPORT: - Type: EXPORT
47 ; EXPORT: - Name: _start
48 ; EXPORT-NOT: - Name: internal_func