578590ee0d3015baf7cd71a29ad5339e611d1fce
[oota-llvm.git] / lib / Target / ARM / ARMMCInstLower.h
1 //===-- ARMMCInstLower.h - Lower MachineInstr to MCInst -------------------===//
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 #ifndef ARM_MCINSTLOWER_H
11 #define ARM_MCINSTLOWER_H
12
13 #include "llvm/Support/Compiler.h"
14
15 namespace llvm {
16   class AsmPrinter;
17   class GlobalValue;
18   class MCAsmInfo;
19   class MCContext;
20   class MCInst;
21   class MCOperand;
22   class MCSymbol;
23   class MCSymbolRefExpr;
24   class MachineInstr;
25   class MachineModuleInfoMachO;
26   class MachineOperand;
27   class Mangler;
28   //class ARMSubtarget;
29
30 /// ARMMCInstLower - This class is used to lower an MachineInstr into an MCInst.
31 class LLVM_LIBRARY_VISIBILITY ARMMCInstLower {
32   MCContext &Ctx;
33   Mangler &Mang;
34   AsmPrinter &Printer;
35 public:
36   ARMMCInstLower(MCContext &ctx, Mangler &mang, AsmPrinter &printer)
37     : Ctx(ctx), Mang(mang), Printer(printer) {}
38
39   void Lower(const MachineInstr *MI, MCInst &OutMI) const;
40
41 private:
42   MCSymbol *GetGlobalAddressSymbol(const GlobalValue *GV) const;
43   MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Sym) const;
44 };
45
46 } // end namespace llvm
47
48 #endif