Lines Matching refs:Kind

205     const GlobalValue *GV, SectionKind Kind, Mangler &Mang,  in getExplicitSectionGlobal()  argument
210 Kind = getELFKindForNamedSection(SectionName, Kind); in getExplicitSectionGlobal()
213 unsigned Flags = getELFSectionFlags(Kind); in getExplicitSectionGlobal()
219 getELFSectionType(SectionName, Kind), Flags, in getExplicitSectionGlobal()
225 static StringRef getSectionPrefixForGlobal(SectionKind Kind) { in getSectionPrefixForGlobal() argument
226 if (Kind.isText()) in getSectionPrefixForGlobal()
228 if (Kind.isReadOnly()) in getSectionPrefixForGlobal()
230 if (Kind.isBSS()) in getSectionPrefixForGlobal()
232 if (Kind.isThreadData()) in getSectionPrefixForGlobal()
234 if (Kind.isThreadBSS()) in getSectionPrefixForGlobal()
236 if (Kind.isData()) in getSectionPrefixForGlobal()
238 assert(Kind.isReadOnlyWithRel() && "Unknown section kind"); in getSectionPrefixForGlobal()
244 SectionKind Kind, Mangler &Mang, in selectELFSectionForGlobal() argument
248 if (Kind.isMergeableCString()) { in selectELFSectionForGlobal()
249 if (Kind.isMergeable2ByteCString()) { in selectELFSectionForGlobal()
251 } else if (Kind.isMergeable4ByteCString()) { in selectELFSectionForGlobal()
255 assert(Kind.isMergeable1ByteCString() && "unknown string width"); in selectELFSectionForGlobal()
257 } else if (Kind.isMergeableConst()) { in selectELFSectionForGlobal()
258 if (Kind.isMergeableConst4()) { in selectELFSectionForGlobal()
260 } else if (Kind.isMergeableConst8()) { in selectELFSectionForGlobal()
263 assert(Kind.isMergeableConst16() && "unknown data width"); in selectELFSectionForGlobal()
276 if (Kind.isMergeableCString()) { in selectELFSectionForGlobal()
285 } else if (Kind.isMergeableConst()) { in selectELFSectionForGlobal()
289 Name = getSectionPrefixForGlobal(Kind); in selectELFSectionForGlobal()
301 return Ctx.getELFSection(Name, getELFSectionType(Name, Kind), Flags, in selectELFSectionForGlobal()
306 const GlobalValue *GV, SectionKind Kind, Mangler &Mang, in SelectSectionForGlobal() argument
308 unsigned Flags = getELFSectionFlags(Kind); in SelectSectionForGlobal()
313 if (!(Flags & ELF::SHF_MERGE) && !Kind.isCommon()) { in SelectSectionForGlobal()
314 if (Kind.isText()) in SelectSectionForGlobal()
321 return selectELFSectionForGlobal(getContext(), GV, Kind, Mang, TM, in SelectSectionForGlobal()
349 const DataLayout &DL, SectionKind Kind, const Constant *C) const { in getSectionForConstant() argument
350 if (Kind.isMergeableConst4() && MergeableConst4Section) in getSectionForConstant()
352 if (Kind.isMergeableConst8() && MergeableConst8Section) in getSectionForConstant()
354 if (Kind.isMergeableConst16() && MergeableConst16Section) in getSectionForConstant()
356 if (Kind.isReadOnly()) in getSectionForConstant()
359 assert(Kind.isReadOnlyWithRel() && "Unknown section kind"); in getSectionForConstant()
522 const GlobalValue *GV, SectionKind Kind, Mangler &Mang, in getExplicitSectionGlobal() argument
543 getContext().getMachOSection(Segment, Section, TAA, StubSize, Kind); in getExplicitSectionGlobal()
564 const GlobalValue *GV, SectionKind Kind, Mangler &Mang, in SelectSectionForGlobal() argument
569 if (Kind.isThreadBSS()) return TLSBSSSection; in SelectSectionForGlobal()
570 if (Kind.isThreadData()) return TLSDataSection; in SelectSectionForGlobal()
572 if (Kind.isText()) in SelectSectionForGlobal()
578 if (Kind.isReadOnly()) in SelectSectionForGlobal()
584 if (Kind.isMergeable1ByteCString() && in SelectSectionForGlobal()
592 if (Kind.isMergeable2ByteCString() && !GV->hasExternalLinkage() && in SelectSectionForGlobal()
599 if (GV->hasPrivateLinkage() && Kind.isMergeableConst()) { in SelectSectionForGlobal()
600 if (Kind.isMergeableConst4()) in SelectSectionForGlobal()
602 if (Kind.isMergeableConst8()) in SelectSectionForGlobal()
604 if (Kind.isMergeableConst16()) in SelectSectionForGlobal()
610 if (Kind.isReadOnly()) in SelectSectionForGlobal()
615 if (Kind.isReadOnlyWithRel()) in SelectSectionForGlobal()
620 if (Kind.isBSSExtern()) in SelectSectionForGlobal()
625 if (Kind.isBSSLocal()) in SelectSectionForGlobal()
633 const DataLayout &DL, SectionKind Kind, const Constant *C) const { in getSectionForConstant() argument
636 if (Kind.isData() || Kind.isReadOnlyWithRel()) in getSectionForConstant()
639 if (Kind.isMergeableConst4()) in getSectionForConstant()
641 if (Kind.isMergeableConst8()) in getSectionForConstant()
643 if (Kind.isMergeableConst16()) in getSectionForConstant()
865 const GlobalValue *GV, SectionKind Kind, Mangler &Mang, in getExplicitSectionGlobal() argument
868 unsigned Characteristics = getCOFFSectionFlags(Kind); in getExplicitSectionGlobal()
889 Kind, in getExplicitSectionGlobal()
894 static const char *getCOFFSectionNameForUniqueGlobal(SectionKind Kind) { in getCOFFSectionNameForUniqueGlobal() argument
895 if (Kind.isText()) in getCOFFSectionNameForUniqueGlobal()
897 if (Kind.isBSS()) in getCOFFSectionNameForUniqueGlobal()
899 if (Kind.isThreadLocal()) in getCOFFSectionNameForUniqueGlobal()
901 if (Kind.isReadOnly() || Kind.isReadOnlyWithRel()) in getCOFFSectionNameForUniqueGlobal()
907 const GlobalValue *GV, SectionKind Kind, Mangler &Mang, in SelectSectionForGlobal() argument
912 if (Kind.isText()) in SelectSectionForGlobal()
917 if ((EmitUniquedSection && !Kind.isCommon()) || GV->hasComdat()) { in SelectSectionForGlobal()
918 const char *Name = getCOFFSectionNameForUniqueGlobal(Kind); in SelectSectionForGlobal()
919 unsigned Characteristics = getCOFFSectionFlags(Kind); in SelectSectionForGlobal()
934 return getContext().getCOFFSection(Name, Characteristics, Kind, in SelectSectionForGlobal()
939 return getContext().getCOFFSection(Name, Characteristics, Kind, TmpData, in SelectSectionForGlobal()
944 if (Kind.isText()) in SelectSectionForGlobal()
947 if (Kind.isThreadLocal()) in SelectSectionForGlobal()
950 if (Kind.isReadOnly() || Kind.isReadOnlyWithRel()) in SelectSectionForGlobal()
956 if (Kind.isBSS() || Kind.isCommon()) in SelectSectionForGlobal()
990 SectionKind Kind = SectionKind::getReadOnly(); in getSectionForJumpTable() local
991 const char *Name = getCOFFSectionNameForUniqueGlobal(Kind); in getSectionForJumpTable()
992 unsigned Characteristics = getCOFFSectionFlags(Kind); in getSectionForJumpTable()
995 return getContext().getCOFFSection(Name, Characteristics, Kind, COMDATSymName, in getSectionForJumpTable()