Mark Target's creation routines as const.
[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   class GlobalVariable;
23   class Type;
24
25   struct ELFTargetAsmInfo: public TargetAsmInfo {
26     explicit ELFTargetAsmInfo(const TargetMachine &TM);
27
28     SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const;
29     virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
30     virtual std::string printSectionFlags(unsigned flags) const;
31     const Section* MergeableConstSection(const GlobalVariable *GV) const;
32     inline const Section* MergeableConstSection(const Type *Ty) const;
33     const Section* MergeableStringSection(const GlobalVariable *GV) const;
34     virtual const Section*
35     SelectSectionForMachineConst(const Type *Ty) const;
36
37     const Section* DataRelSection;
38     const Section* DataRelLocalSection;
39     const Section* DataRelROSection;
40     const Section* DataRelROLocalSection;
41   };
42 }
43
44
45 #endif // LLVM_ELF_TARGET_ASM_INFO_H