[PATCH] D141995: [CSKY] Fix errors caused by change of compressInst

Wang Pengcheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 00:09:17 PST 2023


pcwang-thead created this revision.
pcwang-thead added reviewers: zixuan-wu, craig.topper.
Herald added a subscriber: hiraditya.
Herald added a project: All.
pcwang-thead requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We don't need MCContext since D141951 <https://reviews.llvm.org/D141951>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141995

Files:
  llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
  llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp


Index: llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp
+++ llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp
@@ -58,7 +58,7 @@
 #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);
Index: llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
===================================================================
--- llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
+++ llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
@@ -1747,7 +1747,7 @@
   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());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141995.490058.patch
Type: text/x-patch
Size: 1126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230118/f5dcf34b/attachment.bin>


More information about the llvm-commits mailing list