1; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s 2 3target triple = "wasm32-unknown-unknown" 4 5; Weak external data reference 6@weak_external_data = extern_weak global i32, align 4 7 8; Weak function definition 9define weak hidden i32 @weak_function() local_unnamed_addr #0 { 10entry: 11 %0 = load i32, i32* @weak_external_data, align 4 12 ret i32 %0 13} 14 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 21 22 23; CHECK: SymbolTable: 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 ] 33; CHECK-NEXT: ... 34