Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / wasm / debug-undefined-fs.s
blob06d248b3149b70638644e0d0a676e96e6f9c2fa1
1 # Verify that we can handle R_WASM_FUNCTION_OFFSET relocations against live but
2 # undefined symbols. Test that the .debug_info and .debug_int sections are
3 # generated without error
5 # Based on llvm/test/MC/WebAssembly/debuginfo-relocs.s
7 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
8 # RUN: wasm-ld --import-undefined %t.o -o %t.wasm
9 # RUN: obj2yaml %t.wasm | FileCheck %s
11 .functype undef () -> ()
13 bar:
14 .functype bar () -> ()
15 end_function
17 .globl _start
18 _start:
19 .functype _start () -> ()
20 call bar
21 call undef
22 end_function
24 .section .debug_int,"",@
25 .Ld:
26 .int32 1
27 .size .Ld, 4
29 .section .debug_info,"",@
30 .int32 bar
31 .int32 undef
32 .int32 .Ld
34 # CHECK: Name: .debug_int
35 # CHECK-NEXT: Payload: '01000000'
36 # CHECK: Name: .debug_info
37 # CHECK-NEXT: Payload: 02000000FFFFFFFF00000000