From e4abfc4c3cf47297136bbf06b0f59da50d3f260e Mon Sep 17 00:00:00 2001 From: wangpc Date: Wed, 18 Jan 2023 16:49:32 +0800 Subject: [PATCH] [CSKY] Fix errors caused by change of compressInst We don't need MCContext since D141951. Reviewed By: zixuan-wu Differential Revision: https://reviews.llvm.org/D141995 --- llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp | 2 +- llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp b/llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp index 01b59d4..94ef40e 100644 --- a/llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp +++ b/llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp @@ -1747,7 +1747,7 @@ void CSKYAsmParser::emitToStreamer(MCStreamer &S, const MCInst &Inst) { MCInst CInst; bool Res = false; if (EnableCompressedInst) - Res = compressInst(CInst, Inst, getSTI(), S.getContext()); + Res = compressInst(CInst, Inst, getSTI()); if (Res) ++CSKYNumInstrsCompressed; S.emitInstruction((Res ? CInst : Inst), getSTI()); diff --git a/llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp b/llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp index 49e4b1f..7d121b8 100644 --- a/llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp +++ b/llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp @@ -58,7 +58,7 @@ bool CSKYAsmPrinter::runOnMachineFunction(MachineFunction &MF) { #include "CSKYGenCompressInstEmitter.inc" void CSKYAsmPrinter::EmitToStreamer(MCStreamer &S, const MCInst &Inst) { MCInst CInst; - bool Res = compressInst(CInst, Inst, *Subtarget, OutStreamer->getContext()); + bool Res = compressInst(CInst, Inst, *Subtarget); if (Res) ++CSKYNumInstrsCompressed; AsmPrinter::EmitToStreamer(*OutStreamer, Res ? CInst : Inst); -- 2.7.4