Skip to content

Commit

Permalink
[RISCV] Use the MCStreamer reference passed to RISCVAsmPrinter::EmitT…
Browse files Browse the repository at this point in the history
…oStreamer. NFCI (#111607)

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.
  • Loading branch information
topperc authored Oct 9, 2024
1 parent 64a22b3 commit bb8df02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit bb8df02

Please sign in to comment.