[CSKY] Fix errors caused by change of compressInst
authorwangpc <pc.wang@linux.alibaba.com>
Wed, 18 Jan 2023 08:49:32 +0000 (16:49 +0800)
committerwangpc <pc.wang@linux.alibaba.com>
Wed, 18 Jan 2023 09:01:16 +0000 (17:01 +0800)
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
llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp

index 01b59d4..94ef40e 100644 (file)
@@ -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());
index 49e4b1f..7d121b8 100644 (file)
@@ -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);