[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / lib / Target / M68k / M68kAsmPrinter.h
blobdff3bb876336edb0abbfb762fddcf0f2c75853e9
1 //===----- M68kAsmPrinter.h - M68k LLVM Assembly Printer -------- C++ -*--===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// This file contains M68k assembler printer declarations.
11 ///
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_M68K_M68KASMPRINTER_H
15 #define LLVM_LIB_TARGET_M68K_M68KASMPRINTER_H
17 #include "M68kMCInstLower.h"
18 #include "M68kTargetMachine.h"
20 #include "llvm/CodeGen/AsmPrinter.h"
21 #include "llvm/MC/MCStreamer.h"
22 #include "llvm/Support/Compiler.h"
23 #include "llvm/Target/TargetMachine.h"
24 #include <memory>
25 #include <utility>
27 namespace llvm {
28 class MCStreamer;
29 class MachineInstr;
30 class MachineBasicBlock;
31 class Module;
32 class raw_ostream;
34 class M68kSubtarget;
35 class M68kMachineFunctionInfo;
37 class LLVM_LIBRARY_VISIBILITY M68kAsmPrinter : public AsmPrinter {
39 void EmitInstrWithMacroNoAT(const MachineInstr *MI);
41 void printOperand(const MachineInstr *MI, int OpNum, raw_ostream &OS);
43 public:
44 const M68kSubtarget *Subtarget;
45 const M68kMachineFunctionInfo *MMFI;
46 std::unique_ptr<M68kMCInstLower> MCInstLowering;
48 explicit M68kAsmPrinter(TargetMachine &TM,
49 std::unique_ptr<MCStreamer> Streamer)
50 : AsmPrinter(TM, std::move(Streamer)) {
51 Subtarget = static_cast<M68kTargetMachine &>(TM).getSubtargetImpl();
54 StringRef getPassName() const override { return "M68k Assembly Printer"; }
56 virtual bool runOnMachineFunction(MachineFunction &MF) override;
58 bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
59 const char *ExtraCode, raw_ostream &OS) override;
61 void emitInstruction(const MachineInstr *MI) override;
62 void emitFunctionBodyStart() override;
63 void emitFunctionBodyEnd() override;
64 void emitStartOfAsmFile(Module &M) override;
65 void emitEndOfAsmFile(Module &M) override;
67 } // namespace llvm
69 #endif