Skip to content

Commit 1bf1f13

Browse files
authored
[Hexagon][Disassembler] Set CommentStream of Disassembler (#126766)
Sets CommentStream after assert added in #125962.
1 parent c4fe456 commit 1bf1f13

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonDisassembler() {
172172
DecodeStatus HexagonDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
173173
ArrayRef<uint8_t> Bytes,
174174
uint64_t Address,
175-
raw_ostream &cs) const {
175+
raw_ostream &CS) const {
176+
CommentStream = &CS;
177+
176178
DecodeStatus Result = DecodeStatus::Success;
177179
bool Complete = false;
178180
Size = 0;
@@ -184,7 +186,7 @@ DecodeStatus HexagonDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
184186
if (Bytes.size() < HEXAGON_INSTR_SIZE)
185187
return MCDisassembler::Fail;
186188
MCInst *Inst = getContext().createMCInst();
187-
Result = getSingleInstruction(*Inst, MI, Bytes, Address, cs, Complete);
189+
Result = getSingleInstruction(*Inst, MI, Bytes, Address, CS, Complete);
188190
MI.addOperand(MCOperand::createInst(Inst));
189191
Size += HEXAGON_INSTR_SIZE;
190192
Bytes = Bytes.slice(HEXAGON_INSTR_SIZE);

0 commit comments

Comments
 (0)