diff options
| author | Fangrui Song <maskray@google.com> | 2020-01-11 12:36:13 -0800 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2020-01-11 13:34:52 -0800 |
| commit | 6fdd6a7b3f696972edc244488f59532d05136a27 (patch) | |
| tree | dc7e353f873ffc0db7bae27ad8631a93ba9ac321 /llvm/lib/Target/Hexagon | |
| parent | 2cdb18afda841392002feafda21af31854c195b3 (diff) | |
| download | bcm5719-llvm-6fdd6a7b3f696972edc244488f59532d05136a27.tar.gz bcm5719-llvm-6fdd6a7b3f696972edc244488f59532d05136a27.zip | |
[Disassembler] Delete the VStream parameter of MCDisassembler::getInstruction()
The argument is llvm::null() everywhere except llvm::errs() in
llvm-objdump in -DLLVM_ENABLE_ASSERTIONS=On builds. It is used by no
target but X86 in -DLLVM_ENABLE_ASSERTIONS=On builds.
If we ever have the needs to add verbose log to disassemblers, we can
record log with a member function, instead of passing it around as an
argument.
Diffstat (limited to 'llvm/lib/Target/Hexagon')
| -rw-r--r-- | llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp b/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp index 99e3ee87157..d3fac9175b3 100644 --- a/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp +++ b/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp @@ -53,11 +53,9 @@ public: DecodeStatus getSingleInstruction(MCInst &Instr, MCInst &MCB, ArrayRef<uint8_t> Bytes, uint64_t Address, - raw_ostream &VStream, raw_ostream &CStream, - bool &Complete) const; + raw_ostream &CStream, bool &Complete) const; DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address, - raw_ostream &VStream, raw_ostream &CStream) const override; void remapInstruction(MCInst &Instr) const; }; @@ -166,7 +164,6 @@ extern "C" void LLVMInitializeHexagonDisassembler() { DecodeStatus HexagonDisassembler::getInstruction(MCInst &MI, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address, - raw_ostream &os, raw_ostream &cs) const { DecodeStatus Result = DecodeStatus::Success; bool Complete = false; @@ -179,7 +176,7 @@ DecodeStatus HexagonDisassembler::getInstruction(MCInst &MI, uint64_t &Size, if (Bytes.size() < HEXAGON_INSTR_SIZE) return MCDisassembler::Fail; MCInst *Inst = new (getContext()) MCInst; - Result = getSingleInstruction(*Inst, MI, Bytes, Address, os, cs, Complete); + Result = getSingleInstruction(*Inst, MI, Bytes, Address, cs, Complete); MI.addOperand(MCOperand::createInst(Inst)); Size += HEXAGON_INSTR_SIZE; Bytes = Bytes.slice(HEXAGON_INSTR_SIZE); @@ -290,9 +287,11 @@ static void adjustDuplex(MCInst &MI, MCContext &Context) { } } -DecodeStatus HexagonDisassembler::getSingleInstruction( - MCInst &MI, MCInst &MCB, ArrayRef<uint8_t> Bytes, uint64_t Address, - raw_ostream &os, raw_ostream &cs, bool &Complete) const { +DecodeStatus HexagonDisassembler::getSingleInstruction(MCInst &MI, MCInst &MCB, + ArrayRef<uint8_t> Bytes, + uint64_t Address, + raw_ostream &cs, + bool &Complete) const { assert(Bytes.size() >= HEXAGON_INSTR_SIZE); uint32_t Instruction = support::endian::read32le(Bytes.data()); |

