b8261ef1da5cdd9e402cac8d64359aa0aa1163c1
[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 #include "llvm/Target/TargetMachine.h"
20
21 namespace llvm {
22   class GlobalValue;
23   class GlobalVariable;
24   class Type;
25
26   struct ELFTargetAsmInfo: public virtual TargetAsmInfo {
27     explicit ELFTargetAsmInfo(const TargetMachine &TM);
28
29     virtual const Section* SelectSectionForGlobal(const GlobalValue *GV,
30                                                  bool NoCoalesce = false) const;
31     virtual std::string PrintSectionFlags(unsigned flags) const;
32     const Section* MergeableConstSection(const GlobalVariable *GV) const;
33     inline const Section* MergeableConstSection(const Type *Ty) const;
34     const Section* MergeableStringSection(const GlobalVariable *GV) const;
35     virtual const Section*
36     SelectSectionForMachineConst(const Type *Ty) const;
37   protected:
38     const TargetMachine* ETM;
39   };
40 }
41
42
43 #endif // LLVM_ELF_TARGET_ASM_INFO_H