Replace '#include ValueTypes.h' with forward declarations.
[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/Support/Compiler.h"
20
21 namespace llvm {
22
23 class MCStreamer;
24
25 class LLVM_LIBRARY_VISIBILITY X86AsmPrinter : public AsmPrinter {
26   const X86Subtarget *Subtarget;
27   StackMaps SM;
28
29  public:
30   explicit X86AsmPrinter(TargetMachine &TM, MCStreamer &Streamer)
31     : AsmPrinter(TM, Streamer), SM(*this) {
32     Subtarget = &TM.getSubtarget<X86Subtarget>();
33   }
34
35   const char *getPassName() const override {
36     return "X86 Assembly / Object Emitter";
37   }
38
39   const X86Subtarget &getSubtarget() const { return *Subtarget; }
40
41   void EmitStartOfAsmFile(Module &M) override;
42
43   void EmitEndOfAsmFile(Module &M) override;
44
45   void EmitInstruction(const MachineInstr *MI) override;
46
47   bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
48                        unsigned AsmVariant, const char *ExtraCode,
49                        raw_ostream &OS) override;
50   bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
51                              unsigned AsmVariant, const char *ExtraCode,
52                              raw_ostream &OS) override;
53
54   bool runOnMachineFunction(MachineFunction &F) override;
55 };
56
57 } // end namespace llvm
58
59 #endif