From 5bd33de9c898c6b7e65ada2e07a3cb2cd51ebf1c Mon Sep 17 00:00:00 2001 From: Ronak Chauhan Date: Thu, 18 Jun 2020 01:22:08 +0530 Subject: [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 --- .../lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp') 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 Bytes, uint64_t Address, raw_ostream &CStream) const override; - Optional onSymbolStart(StringRef Name, uint64_t &Size, + Optional onSymbolStart(SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef Bytes, uint64_t Address, raw_ostream &CStream) const override; @@ -122,8 +122,8 @@ bool parseImmediate(MCInst &MI, uint64_t &Size, ArrayRef Bytes) { } Optional WebAssemblyDisassembler::onSymbolStart( - StringRef Name, uint64_t &Size, ArrayRef Bytes, uint64_t Address, - raw_ostream &CStream) const { + SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef 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. -- cgit v1.1