diff options
author | Ronak Chauhan <RonakNilesh.Chauhan@amd.com> | 2020-06-18 01:22:08 +0530 |
---|---|---|
committer | Ronak Chauhan <RonakNilesh.Chauhan@amd.com> | 2020-06-19 09:30:12 +0530 |
commit | 5bd33de9c898c6b7e65ada2e07a3cb2cd51ebf1c (patch) | |
tree | a60c2a01ae4662b728d9cf6255bb7484f839432f /llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp | |
parent | d32c134648547a87199ff712f930fbc65e50060d (diff) | |
download | llvm-5bd33de9c898c6b7e65ada2e07a3cb2cd51ebf1c.zip llvm-5bd33de9c898c6b7e65ada2e07a3cb2cd51ebf1c.tar.gz llvm-5bd33de9c898c6b7e65ada2e07a3cb2cd51ebf1c.tar.bz2 |
[MC] Pass the symbol rather than its name to onSymbolStart()
Summary: This allows targets to also consider the symbol's type and/or address if needed.
Reviewers: scott.linder, jhenderson, MaskRay, aardappel
Reviewed By: scott.linder, MaskRay
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, aheejin, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82090
Diffstat (limited to 'llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp b/llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp index 5a41c2d..42fa6d5 100644 --- a/llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp +++ b/llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp @@ -46,7 +46,7 @@ class WebAssemblyDisassembler final : public MCDisassembler { DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address, raw_ostream &CStream) const override; - Optional<DecodeStatus> onSymbolStart(StringRef Name, uint64_t &Size, + Optional<DecodeStatus> onSymbolStart(SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address, raw_ostream &CStream) const override; @@ -122,8 +122,8 @@ bool parseImmediate(MCInst &MI, uint64_t &Size, ArrayRef<uint8_t> Bytes) { } Optional<MCDisassembler::DecodeStatus> WebAssemblyDisassembler::onSymbolStart( - StringRef Name, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address, - raw_ostream &CStream) const { + SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef<uint8_t> Bytes, + uint64_t Address, raw_ostream &CStream) const { Size = 0; if (Address == 0) { // Start of a code section: we're parsing only the function count. |