1//===-- AVRMCInstLower.h - Lower MachineInstr to MCInst ---------*- 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#ifndef LLVM_AVR_MCINST_LOWER_H
10#define LLVM_AVR_MCINST_LOWER_H
11
12#include "llvm/Support/Compiler.h"
13
14namespace llvm {
15
16class AsmPrinter;
17class MachineInstr;
18class MachineOperand;
19class MCContext;
20class MCInst;
21class MCOperand;
22class MCSymbol;
23
24/// Lowers `MachineInstr` objects into `MCInst` objects.
25class AVRMCInstLower {
26public:
27  AVRMCInstLower(MCContext &Ctx, AsmPrinter &Printer)
28      : Ctx(Ctx), Printer(Printer) {}
29
30  /// Lowers a `MachineInstr` into a `MCInst`.
31  void lowerInstruction(const MachineInstr &MI, MCInst &OutMI) const;
32  MCOperand lowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
33
34private:
35  MCContext &Ctx;
36  AsmPrinter &Printer;
37};
38
39} // end namespace llvm
40
41#endif // LLVM_AVR_MCINST_LOWER_H
42
43