[WebAssembly] Add WebAssembly support to llvm-symbolizer
authorDerek Schuff <dschuff@chromium.org>
Thu, 23 Jan 2020 01:40:11 +0000 (17:40 -0800)
committerDerek Schuff <dschuff@chromium.org>
Tue, 28 Jan 2020 17:55:38 +0000 (09:55 -0800)
commitda6a896e6b1b1e397297b08a565940f1e0391cb7
tree32747154ffc49f302a3b20cacdfecac0498cf495
parent2e5d20bd478868c80aa595e969d17734690f9b4d
[WebAssembly] Add WebAssembly support to llvm-symbolizer

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
llvm/include/llvm/Object/Wasm.h
llvm/lib/Object/SymbolSize.cpp
llvm/lib/Object/WasmObjectFile.cpp
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
llvm/test/tools/llvm-symbolizer/wasm-basic.s [new file with mode: 0644]