pass machinemoduleinfo down into getSymbolForDwarfGlobalReference,
[llvm/avr.git] / lib / Target / X86 / AsmPrinter / X86MCInstLower.h
blobeffd9604028011b025edf7f123bd64936556c489
1 //===-- X86MCInstLower.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 //===----------------------------------------------------------------------===//
10 #ifndef X86_MCINSTLOWER_H
11 #define X86_MCINSTLOWER_H
13 #include "llvm/Support/Compiler.h"
15 namespace llvm {
16 class MCContext;
17 class MCInst;
18 class MCOperand;
19 class MCSymbol;
20 class MachineInstr;
21 class MachineModuleInfoMachO;
22 class MachineOperand;
23 class Mangler;
24 class X86ATTAsmPrinter;
25 class X86Subtarget;
27 /// X86MCInstLower - This class is used to lower an MachineInstr into an MCInst.
28 class VISIBILITY_HIDDEN X86MCInstLower {
29 MCContext &Ctx;
30 Mangler *Mang;
31 X86ATTAsmPrinter &AsmPrinter;
33 const X86Subtarget &getSubtarget() const;
34 public:
35 X86MCInstLower(MCContext &ctx, Mangler *mang, X86ATTAsmPrinter &asmprinter)
36 : Ctx(ctx), Mang(mang), AsmPrinter(asmprinter) {}
38 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
40 MCSymbol *GetPICBaseSymbol() const;
42 MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
43 MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
44 MCSymbol *GetJumpTableSymbol(const MachineOperand &MO) const;
45 MCSymbol *GetConstantPoolIndexSymbol(const MachineOperand &MO) const;
46 MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
48 private:
49 MachineModuleInfoMachO &getMachOMMI() const;
54 #endif