brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · d288cc0 Raw
44 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_AVR_MCINST_LOWER_H10#define LLVM_AVR_MCINST_LOWER_H11 12#include "AVRSubtarget.h"13#include "llvm/Support/Compiler.h"14 15namespace llvm {16 17class AsmPrinter;18class MachineInstr;19class MachineOperand;20class MCContext;21class MCInst;22class MCOperand;23class MCSymbol;24 25/// Lowers `MachineInstr` objects into `MCInst` objects.26class AVRMCInstLower {27public:28  AVRMCInstLower(MCContext &Ctx, AsmPrinter &Printer)29      : Ctx(Ctx), Printer(Printer) {}30 31  /// Lowers a `MachineInstr` into a `MCInst`.32  void lowerInstruction(const MachineInstr &MI, MCInst &OutMI) const;33  MCOperand lowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym,34                               const AVRSubtarget &Subtarget) const;35 36private:37  MCContext &Ctx;38  AsmPrinter &Printer;39};40 41} // end namespace llvm42 43#endif // LLVM_AVR_MCINST_LOWER_H44