1 //===---- ELFTargetAsmInfo.h - ELF asm properties ---------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines target asm properties related what form asm statements
11 // should take in general on ELF-based targets
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_ELF_TARGET_ASM_INFO_H
16 #define LLVM_ELF_TARGET_ASM_INFO_H
18 #include "llvm/Target/TargetAsmInfo.h"
23 struct ELFTargetAsmInfo : public TargetAsmInfo {
24 ELFTargetAsmInfo(const TargetMachine &TM);
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;
32 virtual SectionKind::Kind getKindForNamedSection(const char *Section,
33 SectionKind::Kind K) const;
34 void getSectionFlagsAsString(SectionKind Kind,
35 SmallVectorImpl<char> &Str) const;
37 const char *getSectionPrefixForUniqueGlobal(SectionKind Kind) const;
39 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV,
40 SectionKind Kind) const;
42 const Section *DataRelSection;
43 const Section *DataRelLocalSection;
44 const Section *DataRelROSection;
45 const Section *DataRelROLocalSection;
47 const Section *MergeableConst4Section;
48 const Section *MergeableConst8Section;
49 const Section *MergeableConst16Section;
54 #endif // LLVM_ELF_TARGET_ASM_INFO_H