1 ; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
3 target triple = "wasm32-unknown-unknown"
5 ; Weak external data reference
6 @weak_external_data = extern_weak global i32, align 4
8 ; Weak function definition
9 define weak hidden i32 @weak_function() local_unnamed_addr #0 {
11 %0 = load i32, i32* @weak_external_data, align 4
15 ; CHECK: - Type: IMPORT
16 ; CHECK-NEXT: Imports:
17 ; CHECK: - Module: env
18 ; CHECK-NEXT: Field: __linear_memory
19 ; CHECK: - Module: env
20 ; CHECK-NEXT: Field: __indirect_function_table
24 ; CHECK-NEXT: - Index: 0
25 ; CHECK-NEXT: Kind: FUNCTION
26 ; CHECK-NEXT: Name: weak_function
27 ; CHECK-NEXT: Flags: [ BINDING_WEAK, VISIBILITY_HIDDEN ]
28 ; CHECK-NEXT: Function: 0
29 ; CHECK-NEXT: - Index: 1
30 ; CHECK-NEXT: Kind: DATA
31 ; CHECK-NEXT: Name: weak_external_data
32 ; CHECK-NEXT: Flags: [ BINDING_WEAK, UNDEFINED ]