1 //===-- WebAssemblyMCInstLower.h - Lower MachineInstr to MCInst -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief This file declares the class to lower WebAssembly MachineInstrs to
12 /// their corresponding MCInst records.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYMCINSTLOWER_H
17 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYMCINSTLOWER_H
19 #include "llvm/Support/Compiler.h"
28 class MachineModuleInfoMachO;
32 // WebAssemblyMCInstLower - This class is used to lower an MachineInstr into an
34 class LLVM_LIBRARY_VISIBILITY WebAssemblyMCInstLower {
40 WebAssemblyMCInstLower(MCContext &ctx, AsmPrinter &printer)
41 : Ctx(ctx), Printer(printer) {}
42 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
44 MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
46 MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
47 MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;