Lines Matching refs:Kind
175 getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, in getExplicitSectionGlobal() argument
180 Kind = getELFKindForNamedSection(SectionName, Kind); in getExplicitSectionGlobal()
183 getELFSectionType(SectionName, Kind), in getExplicitSectionGlobal()
184 getELFSectionFlags(Kind), Kind); in getExplicitSectionGlobal()
189 static const char *getSectionPrefixForGlobal(SectionKind Kind) { in getSectionPrefixForGlobal() argument
190 if (Kind.isText()) return ".text."; in getSectionPrefixForGlobal()
191 if (Kind.isReadOnly()) return ".rodata."; in getSectionPrefixForGlobal()
193 if (Kind.isThreadData()) return ".tdata."; in getSectionPrefixForGlobal()
194 if (Kind.isThreadBSS()) return ".tbss."; in getSectionPrefixForGlobal()
196 if (Kind.isDataNoRel()) return ".data."; in getSectionPrefixForGlobal()
197 if (Kind.isDataRelLocal()) return ".data.rel.local."; in getSectionPrefixForGlobal()
198 if (Kind.isDataRel()) return ".data.rel."; in getSectionPrefixForGlobal()
199 if (Kind.isReadOnlyWithRelLocal()) return ".data.rel.ro.local."; in getSectionPrefixForGlobal()
201 assert(Kind.isReadOnlyWithRel() && "Unknown section kind"); in getSectionPrefixForGlobal()
207 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, in SelectSectionForGlobal() argument
212 if (Kind.isText()) in SelectSectionForGlobal()
220 !Kind.isCommon() && !Kind.isBSS()) { in SelectSectionForGlobal()
222 Prefix = getSectionPrefixForGlobal(Kind); in SelectSectionForGlobal()
228 unsigned Flags = getELFSectionFlags(Kind); in SelectSectionForGlobal()
235 getELFSectionType(Name.str(), Kind), in SelectSectionForGlobal()
236 Flags, Kind, 0, Group); in SelectSectionForGlobal()
239 if (Kind.isText()) return TextSection; in SelectSectionForGlobal()
241 if (Kind.isMergeable1ByteCString() || in SelectSectionForGlobal()
242 Kind.isMergeable2ByteCString() || in SelectSectionForGlobal()
243 Kind.isMergeable4ByteCString()) { in SelectSectionForGlobal()
252 if (Kind.isMergeable2ByteCString()) in SelectSectionForGlobal()
254 else if (Kind.isMergeable4ByteCString()) in SelectSectionForGlobal()
257 assert(Kind.isMergeable1ByteCString() && "unknown string width"); in SelectSectionForGlobal()
265 Kind); in SelectSectionForGlobal()
268 if (Kind.isMergeableConst()) { in SelectSectionForGlobal()
269 if (Kind.isMergeableConst4() && MergeableConst4Section) in SelectSectionForGlobal()
271 if (Kind.isMergeableConst8() && MergeableConst8Section) in SelectSectionForGlobal()
273 if (Kind.isMergeableConst16() && MergeableConst16Section) in SelectSectionForGlobal()
278 if (Kind.isReadOnly()) return ReadOnlySection; in SelectSectionForGlobal()
280 if (Kind.isThreadData()) return TLSDataSection; in SelectSectionForGlobal()
281 if (Kind.isThreadBSS()) return TLSBSSSection; in SelectSectionForGlobal()
286 if (Kind.isBSS() || Kind.isCommon()) return BSSSection; in SelectSectionForGlobal()
288 if (Kind.isDataNoRel()) return DataSection; in SelectSectionForGlobal()
289 if (Kind.isDataRelLocal()) return DataRelLocalSection; in SelectSectionForGlobal()
290 if (Kind.isDataRel()) return DataRelSection; in SelectSectionForGlobal()
291 if (Kind.isReadOnlyWithRelLocal()) return DataRelROLocalSection; in SelectSectionForGlobal()
293 assert(Kind.isReadOnlyWithRel() && "Unknown section kind"); in SelectSectionForGlobal()
301 getSectionForConstant(SectionKind Kind) const { in getSectionForConstant()
302 if (Kind.isMergeableConst4() && MergeableConst4Section) in getSectionForConstant()
304 if (Kind.isMergeableConst8() && MergeableConst8Section) in getSectionForConstant()
306 if (Kind.isMergeableConst16() && MergeableConst16Section) in getSectionForConstant()
308 if (Kind.isReadOnly()) in getSectionForConstant()
311 if (Kind.isReadOnlyWithRelLocal()) return DataRelROLocalSection; in getSectionForConstant()
312 assert(Kind.isReadOnlyWithRel() && "Unknown section kind"); in getSectionForConstant()
350 getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, in getExplicitSectionGlobal() argument
370 getContext().getMachOSection(Segment, Section, TAA, StubSize, Kind); in getExplicitSectionGlobal()
391 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, in SelectSectionForGlobal() argument
395 if (Kind.isThreadBSS()) return TLSBSSSection; in SelectSectionForGlobal()
396 if (Kind.isThreadData()) return TLSDataSection; in SelectSectionForGlobal()
398 if (Kind.isText()) in SelectSectionForGlobal()
404 if (Kind.isReadOnly()) in SelectSectionForGlobal()
410 if (Kind.isMergeable1ByteCString() && in SelectSectionForGlobal()
417 if (Kind.isMergeable2ByteCString() && !GV->hasExternalLinkage() && in SelectSectionForGlobal()
421 if (Kind.isMergeableConst()) { in SelectSectionForGlobal()
422 if (Kind.isMergeableConst4()) in SelectSectionForGlobal()
424 if (Kind.isMergeableConst8()) in SelectSectionForGlobal()
426 if (Kind.isMergeableConst16() && SixteenByteConstantSection) in SelectSectionForGlobal()
432 if (Kind.isReadOnly()) in SelectSectionForGlobal()
437 if (Kind.isReadOnlyWithRel()) in SelectSectionForGlobal()
442 if (Kind.isBSSExtern()) in SelectSectionForGlobal()
447 if (Kind.isBSSLocal()) in SelectSectionForGlobal()
455 TargetLoweringObjectFileMachO::getSectionForConstant(SectionKind Kind) const { in getSectionForConstant()
458 if (Kind.isDataRel() || Kind.isReadOnlyWithRel()) in getSectionForConstant()
461 if (Kind.isMergeableConst4()) in getSectionForConstant()
463 if (Kind.isMergeableConst8()) in getSectionForConstant()
465 if (Kind.isMergeableConst16() && SixteenByteConstantSection) in getSectionForConstant()
597 getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, in getExplicitSectionGlobal() argument
600 getCOFFSectionFlags(Kind), in getExplicitSectionGlobal()
601 Kind); in getExplicitSectionGlobal()
604 static const char *getCOFFSectionPrefixForUniqueGlobal(SectionKind Kind) { in getCOFFSectionPrefixForUniqueGlobal() argument
605 if (Kind.isText()) in getCOFFSectionPrefixForUniqueGlobal()
607 if (Kind.isBSS ()) in getCOFFSectionPrefixForUniqueGlobal()
609 if (Kind.isWriteable()) in getCOFFSectionPrefixForUniqueGlobal()
616 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, in SelectSectionForGlobal() argument
618 assert(!Kind.isThreadLocal() && "Doesn't support TLS"); in SelectSectionForGlobal()
623 const char *Prefix = getCOFFSectionPrefixForUniqueGlobal(Kind); in SelectSectionForGlobal()
628 unsigned Characteristics = getCOFFSectionFlags(Kind); in SelectSectionForGlobal()
633 COFF::IMAGE_COMDAT_SELECT_ANY, Kind); in SelectSectionForGlobal()
636 if (Kind.isText()) in SelectSectionForGlobal()