LLVM  4.0.0
WebAssemblyMCInstLower.h
Go to the documentation of this file.
1 //===-- WebAssemblyMCInstLower.h - Lower MachineInstr to MCInst -*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// \brief This file declares the class to lower WebAssembly MachineInstrs to
12 /// their corresponding MCInst records.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYMCINSTLOWER_H
17 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYMCINSTLOWER_H
18 
19 #include "llvm/MC/MCInst.h"
20 #include "llvm/Support/Compiler.h"
21 
22 namespace llvm {
23 class AsmPrinter;
24 class MCContext;
25 class MCSymbol;
26 class MachineInstr;
27 class MachineOperand;
28 
29 /// This class is used to lower an MachineInstr into an MCInst.
31  MCContext &Ctx;
33 
34  MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
35  MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
37  bool IsFunc) const;
38 
39 public:
41  : Ctx(ctx), Printer(printer) {}
42  void Lower(const MachineInstr *MI, MCInst &OutMI) const;
43 };
44 } // end namespace llvm
45 
46 #endif
This class is used to lower an MachineInstr into an MCInst.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:39
print alias Alias Set Printer
Context object for machine code objects.
Definition: MCContext.h:51
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:150
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:67
uint32_t Offset
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Definition: Compiler.h:105
static MCOperand LowerSymbolOperand(const MachineInstr *MI, const MachineOperand &MO, AsmPrinter &AP)
MachineOperand class - Representation of each machine instruction operand.
Representation of each machine instruction.
Definition: MachineInstr.h:52
IRTranslator LLVM IR MI
Instances of this class represent operands of the MCInst class.
Definition: MCInst.h:33
WebAssemblyMCInstLower(MCContext &ctx, AsmPrinter &printer)