Skip to content
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

[RISCV] Use the MCStreamer reference passed to RISCVAsmPrinter::EmitToStreamer. NFCI #111607

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

topperc
Copy link
Collaborator

@topperc topperc commented Oct 8, 2024

We passed a MCStreamer to the function but hardcoded *OutStreamer instead of using it. It's very likely that OutStreamer is the only streamer used, but lets not assume that without doing the audit.

…oStreamer. NFCI

We passed a MCStreamer but hardcoded *OutStreamer. It's very likely
that OutStreamer is the only streamer used, but lets not assume that
without doing the audit.
@llvmbot
Copy link
Collaborator

llvmbot commented Oct 8, 2024

@llvm/pr-subscribers-backend-risc-v

Author: Craig Topper (topperc)

Changes

We passed a MCStreamer to the function but hardcoded *OutStreamer instead of using it. It's very likely that OutStreamer is the only streamer used, but lets not assume that without doing the audit.


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

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp (+1-1)
diff --git a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
index 52d0a70d335e97..3bed8c4349dac0 100644
--- a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+++ b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
@@ -247,7 +247,7 @@ bool RISCVAsmPrinter::EmitToStreamer(MCStreamer &S, const MCInst &Inst) {
   bool Res = RISCVRVC::compress(CInst, Inst, *STI);
   if (Res)
     ++RISCVNumInstrsCompressed;
-  AsmPrinter::EmitToStreamer(*OutStreamer, Res ? CInst : Inst);
+  AsmPrinter::EmitToStreamer(S, Res ? CInst : Inst);
   return Res;
 }
 

@topperc topperc merged commit bb8df02 into llvm:main Oct 9, 2024
11 checks passed
@topperc topperc deleted the pr/straemer branch October 9, 2024 02:22
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