Re-sort all of the includes with ./utils/sort_includes.py so that
[oota-llvm.git] / lib / Target / X86 / X86AsmPrinter.h
1 //===-- X86AsmPrinter.h - X86 implementation of AsmPrinter ------*- 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 #ifndef X86ASMPRINTER_H
11 #define X86ASMPRINTER_H
12
13 #include "X86.h"
14 #include "X86MachineFunctionInfo.h"
15 #include "X86TargetMachine.h"
16 #include "llvm/CodeGen/AsmPrinter.h"
17 #include "llvm/CodeGen/MachineModuleInfo.h"
18 #include "llvm/CodeGen/StackMaps.h"
19 #include "llvm/CodeGen/ValueTypes.h"
20 #include "llvm/Support/Compiler.h"
21
22 namespace llvm {
23
24 class MCStreamer;
25
26 class LLVM_LIBRARY_VISIBILITY X86AsmPrinter : public AsmPrinter {
27   const X86Subtarget *Subtarget;
28   StackMaps SM;
29
30  public:
31   explicit X86AsmPrinter(TargetMachine &TM, MCStreamer &Streamer)
32     : AsmPrinter(TM, Streamer), SM(*this) {
33     Subtarget = &TM.getSubtarget<X86Subtarget>();
34   }
35
36   virtual const char *getPassName() const LLVM_OVERRIDE {
37     return "X86 Assembly / Object Emitter";
38   }
39
40   const X86Subtarget &getSubtarget() const { return *Subtarget; }
41
42   virtual void EmitStartOfAsmFile(Module &M) LLVM_OVERRIDE;
43
44   virtual void EmitEndOfAsmFile(Module &M) LLVM_OVERRIDE;
45
46   virtual void EmitInstruction(const MachineInstr *MI) LLVM_OVERRIDE;
47
48   virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
49                                unsigned AsmVariant, const char *ExtraCode,
50                                raw_ostream &OS) LLVM_OVERRIDE;
51   virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
52                                      unsigned AsmVariant, const char *ExtraCode,
53                                      raw_ostream &OS) LLVM_OVERRIDE;
54
55   virtual bool runOnMachineFunction(MachineFunction &F) LLVM_OVERRIDE;
56 };
57
58 } // end namespace llvm
59
60 #endif