mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
b5f6f74751
The only thing missing for basic llvm-symbolizer support is the ability on lib/Object to get a wasm symbol's section ID, which allows sorting and computation of the symbols' sizes. Also, when the WasmAsmParser switches sections on new functions, also add the section to the list of Dwarf sections if Dwarf is being generated for assembly; this allows writing of simple tests. Reviewers: sbc100, jhenderson, aardappel Differential Revision: https://reviews.llvm.org/D73246
24 lines
624 B
ArmAsm
24 lines
624 B
ArmAsm
# REQUIRES: webassembly-registered-target
|
|
# RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj %s -o %t.o -g
|
|
|
|
foo:
|
|
.functype foo () -> ()
|
|
nop
|
|
end_function
|
|
|
|
bar:
|
|
.functype bar (i32) -> (i32)
|
|
return
|
|
end_function
|
|
|
|
# RUN: llvm-symbolizer -e %t.o 3 4 7 8 | FileCheck %s
|
|
## Byte 1 is the function length and 2 is the locals declaration.
|
|
## Currently no line corresponds to them.
|
|
## TODO: create a loc for .functype?
|
|
|
|
## Test 2 functions to ensure wasm's function-sections system works.
|
|
# CHECK: wasm-basic.s:6:0
|
|
# CHECK: wasm-basic.s:7:0
|
|
# CHECK: wasm-basic.s:11:0
|
|
# CHECK: wasm-basic.s:12:0
|