Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / WebAssembly / weak.s
blob9d13e84e152e7f47ce37bd0a08e99afcd5273e0d
1 # RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj -o %t.o < %s
2 # RUN: obj2yaml %t.o | FileCheck %s
4 weak_function:
5 .functype weak_function () -> (i32)
6 .hidden weak_function
7 .weak weak_function
8 i32.const 0
9 i32.load weak_external_data
10 end_function
12 .weak weak_external_data
14 # CHECK: SymbolTable:
15 # CHECK-NEXT: - Index: 0
16 # CHECK-NEXT: Kind: FUNCTION
17 # CHECK-NEXT: Name: weak_function
18 # CHECK-NEXT: Flags: [ BINDING_WEAK, VISIBILITY_HIDDEN ]
19 # CHECK-NEXT: Function: 0
20 # CHECK-NEXT: - Index: 1
21 # CHECK-NEXT: Kind: DATA
22 # CHECK-NEXT: Name: weak_external_data
23 # CHECK-NEXT: Flags: [ BINDING_WEAK, UNDEFINED ]
24 # CHECK-NEXT: ...