Skip to content

[Hexagon][Disassembler] Set CommentStream of Disassembler #126766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

quic-areg
Copy link
Contributor

Sets CommentStream after assert added in #125962.

@llvmbot
Copy link
Member

llvmbot commented Feb 11, 2025

@llvm/pr-subscribers-backend-hexagon

Author: None (quic-areg)

Changes

Sets CommentStream after assert added in #125962.


Full diff: https://github.com/llvm/llvm-project/pull/126766.diff

1 Files Affected:

  • (modified) llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp (+4-2)
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);

@quic-areg quic-areg merged commit 1bf1f13 into llvm:main Feb 11, 2025
10 checks passed
@quic-areg quic-areg deleted the hexagon-cstream branch February 11, 2025 19:21
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
flovent pushed a commit to flovent/llvm-project that referenced this pull request Feb 13, 2025
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request Feb 14, 2025
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants