Skip to content

Commit f0fc1d3

Browse files
authored
[RISCV] Use MCStreamer::emitInstruction instead of calling AsmPrinter::EmitToStreamer. NFC (#111714)
This allows us to pass the STI we already have cached instead of AsmPrinter::EmitToStreamer looking it up from the MachineFunction again. My plan is to make EmitHwasanMemaccessSymbols use RISCVAsmPrinter::EmitToStreamer instead of calling MCStreamer::emitInstruction. To do that I need control of the MCSubtargetInfo.
1 parent 74e1062 commit f0fc1d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ bool RISCVAsmPrinter::EmitToStreamer(MCStreamer &S, const MCInst &Inst) {
247247
bool Res = RISCVRVC::compress(CInst, Inst, *STI);
248248
if (Res)
249249
++RISCVNumInstrsCompressed;
250-
AsmPrinter::EmitToStreamer(S, Res ? CInst : Inst);
250+
S.emitInstruction(Res ? CInst : Inst, *STI);
251251
return Res;
252252
}
253253

0 commit comments

Comments
 (0)