[llvm] 1bf1f13 - [Hexagon][Disassembler] Set CommentStream of Disassembler (#126766)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 11 11:20:43 PST 2025
Author: quic-areg
Date: 2025-02-11T13:20:38-06:00
New Revision: 1bf1f13be94fa5f4994d10310ec349cc3450d70f
URL: https://github.com/llvm/llvm-project/commit/1bf1f13be94fa5f4994d10310ec349cc3450d70f
DIFF: https://github.com/llvm/llvm-project/commit/1bf1f13be94fa5f4994d10310ec349cc3450d70f.diff
LOG: [Hexagon][Disassembler] Set CommentStream of Disassembler (#126766)
Sets CommentStream after assert added in #125962.
Added:
Modified:
llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp b/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp
index 4a80ca81c672b..98b711f6b014b 100644
--- a/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp
+++ b/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp
@@ -172,7 +172,9 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonDisassembler() {
DecodeStatus HexagonDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
ArrayRef<uint8_t> Bytes,
uint64_t Address,
- raw_ostream &cs) const {
+ raw_ostream &CS) const {
+ CommentStream = &CS;
+
DecodeStatus Result = DecodeStatus::Success;
bool Complete = false;
Size = 0;
@@ -184,7 +186,7 @@ DecodeStatus HexagonDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
if (Bytes.size() < HEXAGON_INSTR_SIZE)
return MCDisassembler::Fail;
MCInst *Inst = getContext().createMCInst();
- Result = getSingleInstruction(*Inst, MI, Bytes, Address, 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);
More information about the llvm-commits
mailing list