Split PrintSectionFlags
[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 std::string SectionForGlobal(const GlobalValue *GV) const;
29
30   private:
31     bool LowerToBSwap(CallInst *CI) const;
32   protected:
33     const X86TargetMachine* X86TM;
34   };
35
36   struct X86DarwinTargetAsmInfo : public X86TargetAsmInfo {
37     explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
38     virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
39                                            bool Global) const;
40     virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
41                                                SectionKind::Kind kind) const;
42   };
43
44   struct X86ELFTargetAsmInfo : public X86TargetAsmInfo {
45     explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
46     virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
47                                            bool Global) const;
48     virtual std::string PrintSectionFlags(unsigned flags) const;
49   };
50
51   struct X86COFFTargetAsmInfo : public X86TargetAsmInfo {
52     explicit X86COFFTargetAsmInfo(const X86TargetMachine &TM);
53     virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
54                                            bool Global) const;
55     virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
56                                                SectionKind::Kind kind) const;
57     virtual std::string PrintSectionFlags(unsigned flags) const;
58   };
59
60   struct X86WinTargetAsmInfo : public X86TargetAsmInfo {
61     explicit X86WinTargetAsmInfo(const X86TargetMachine &TM);
62   };
63 } // namespace llvm
64
65 #endif