Index: llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp =================================================================== --- llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp +++ llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp @@ -15,7 +15,6 @@ #include "MCTargetDesc/RISCVMCExpr.h" #include "MCTargetDesc/RISCVTargetStreamer.h" #include "RISCV.h" -#include "RISCVMCInstLower.h" #include "RISCVTargetMachine.h" #include "TargetInfo/RISCVTargetInfo.h" #include "llvm/ADT/Statistic.h" @@ -42,15 +41,13 @@ namespace { class RISCVAsmPrinter : public AsmPrinter { const MCSubtargetInfo *MCSTI; - RISCVMCInstLower MCInstLowering; StackMaps SM; const RISCVSubtarget *STI; public: explicit RISCVAsmPrinter(TargetMachine &TM, std::unique_ptr Streamer) - : AsmPrinter(TM, std::move(Streamer)), MCSTI(TM.getMCSubtargetInfo()), - MCInstLowering(OutContext, *this), SM(*this) {} + : AsmPrinter(TM, std::move(Streamer)), MCSTI(TM.getMCSubtargetInfo()), SM(*this) {} StringRef getPassName() const override { return "RISCV Assembly Printer"; } Index: llvm/lib/Target/RISCV/RISCVMCInstLower.h =================================================================== --- llvm/lib/Target/RISCV/RISCVMCInstLower.h +++ /dev/null @@ -1,40 +0,0 @@ -//===-- RISCVMCInstLower.h - Lower MachineInstr to MCInst -----------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_TARGET_RISCV_RISCVMCINSTLOWER_H -#define LLVM_LIB_TARGET_RISCV_RISCVMCINSTLOWER_H - -#include "llvm/ADT/Triple.h" -#include "llvm/Support/Compiler.h" - -namespace llvm { -class AsmPrinter; -class MCAsmInfo; -class MCContext; -class MCInst; -class MCOperand; -class MCSymbol; -class MachineInstr; -class MachineModuleInfoMachO; -class MachineOperand; -class Mangler; - -/// RISCVMCInstLower - This class is used to lower an MachineInstr -/// into an MCInst. -class LLVM_LIBRARY_VISIBILITY RISCVMCInstLower { - MCContext &Ctx; - AsmPrinter &Printer; - Triple TargetTriple; - -public: - RISCVMCInstLower(MCContext &ctx, AsmPrinter &printer); - -}; -} - -#endif Index: llvm/lib/Target/RISCV/RISCVMCInstLower.cpp =================================================================== --- llvm/lib/Target/RISCV/RISCVMCInstLower.cpp +++ llvm/lib/Target/RISCV/RISCVMCInstLower.cpp @@ -11,7 +11,6 @@ // //===----------------------------------------------------------------------===// -#include "RISCVMCInstLower.h" #include "RISCV.h" #include "RISCVSubtarget.h" #include "MCTargetDesc/RISCVMCExpr.h" @@ -27,9 +26,6 @@ using namespace llvm; -RISCVMCInstLower::RISCVMCInstLower(MCContext &ctx, AsmPrinter &printer) - : Ctx(ctx), Printer(printer) {} - static MCOperand lowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym, const AsmPrinter &AP) { MCContext &Ctx = AP.OutContext;