Split X86TargetAsmInfo into 4 subtarget-specific classes
[oota-llvm.git] / lib / Target / X86 / X86TargetAsmInfo.h
1 //=====-- X86TargetAsmInfo.h - X86 asm properties -------------*- 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 // This file contains the declaration of the X86TargetAsmInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef X86TARGETASMINFO_H
15 #define X86TARGETASMINFO_H
16
17 #include "llvm/Target/TargetAsmInfo.h"
18
19 namespace llvm {
20
21   // Forward declaration.
22   class X86TargetMachine;
23
24   struct X86TargetAsmInfo : public TargetAsmInfo {
25     explicit X86TargetAsmInfo(const X86TargetMachine &TM);
26
27     virtual bool ExpandInlineAsm(CallInst *CI) const;
28     virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
29                                            bool Global) const;
30     virtual std::string SectionForGlobal(const GlobalValue *GV) const;
31     virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
32                                                SectionKind::Kind kind) const;
33     virtual std::string PrintSectionFlags(unsigned flags) const;
34
35   private:
36     bool LowerToBSwap(CallInst *CI) const;
37   protected:
38     const X86TargetMachine* X86TM;
39   };
40
41   struct X86DarwinTargetAsmInfo : public X86TargetAsmInfo {
42     explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
43   };
44
45   struct X86ELFTargetAsmInfo : public X86TargetAsmInfo {
46     explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
47   };
48
49   struct X86COFFTargetAsmInfo : public X86TargetAsmInfo {
50     explicit X86COFFTargetAsmInfo(const X86TargetMachine &TM);
51   };
52
53   struct X86WinTargetAsmInfo : public X86TargetAsmInfo {
54     explicit X86WinTargetAsmInfo(const X86TargetMachine &TM);
55   };
56 } // namespace llvm
57
58 #endif