inline a method.
[oota-llvm.git] / include / llvm / Target / ELFTargetAsmInfo.h
1 //===---- ELFTargetAsmInfo.h - ELF 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 defines target asm properties related what form asm statements
11 // should take in general on ELF-based targets
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_ELF_TARGET_ASM_INFO_H
16 #define LLVM_ELF_TARGET_ASM_INFO_H
17
18 #include "llvm/Target/TargetAsmInfo.h"
19
20 namespace llvm {
21   class GlobalValue;
22
23   struct ELFTargetAsmInfo : public TargetAsmInfo {
24     ELFTargetAsmInfo(const TargetMachine &TM);
25
26     /// getSectionForMergeableConstant - Given a mergeable constant with the
27     /// specified size and relocation information, return a section that it
28     /// should be placed in.
29     virtual const Section *
30     getSectionForMergeableConstant(SectionKind Kind) const;
31     
32     virtual SectionKind::Kind getKindForNamedSection(const char *Section,
33                                                      SectionKind::Kind K) const;
34     void getSectionFlagsAsString(SectionKind Kind,
35                                  SmallVectorImpl<char> &Str) const;
36     
37     const char *getSectionPrefixForUniqueGlobal(SectionKind Kind) const;
38     
39     virtual const Section* SelectSectionForGlobal(const GlobalValue *GV,
40                                                   SectionKind Kind) const;
41     
42     const Section *DataRelSection;
43     const Section *DataRelLocalSection;
44     const Section *DataRelROSection;
45     const Section *DataRelROLocalSection;
46
47     const Section *MergeableConst4Section;
48     const Section *MergeableConst8Section;
49     const Section *MergeableConst16Section;
50   };
51 }
52
53
54 #endif // LLVM_ELF_TARGET_ASM_INFO_H