1 # REQUIRES: webassembly-registered-target
2 # RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj %s -o %t.o -g
3 # RUN: llvm-symbolizer --basenames --output-style=GNU -e %t.o 1 2 3 4 5 6 7 8 9 10 11 12 13 | FileCheck %s
12 .functype bar (i32) -> (i32)
19 ## Symbols start from (including) the function length and should cover all the
20 ## way to the next symbol start.
21 ## TODO: create a loc for .functype? It could go with the local declarations.
23 ## Byte 1 is the function length, has no loc but the symbol table considers it
24 ## the start of the function
27 ## Byte 2 is the local declaration, but for some reason DWARF is marking it as line 7.
28 ## TODO: figure out why.
30 # CHECK-NEXT: wasm-basic.s:7
31 ## Byte 3 is actually the nop, line 7
33 # CHECK-NEXT: wasm-basic.s:7
34 ## Byte 4 is the return, line 8
36 # CHECK-NEXT: wasm-basic.s:8
37 ## Byte 5 is the end_function, line 9
39 # CHECK-NEXT: wasm-basic.s:9
40 ## Byte 6 is bar's function length, symbol table considers it part of bar
43 ## Byte 7 bar's local declaration, but DWARF marks it as line 13, like above
45 # CHECK-NEXT: wasm-basic.s:13
46 ## Byte 8 and 9 are actually the local.get on line 13
48 # CHECK-NEXT: wasm-basic.s:13
50 # CHECK-NEXT: wasm-basic.s:13
53 # CHECK-NEXT: wasm-basic.s:14
54 ## Byte b is the return
56 # CHECK-NEXT: wasm-basic.s:15
57 ## Byte c is end_function
59 # CHECK-NEXT: wasm-basic.s:16