@@ -758,7 +758,7 @@ calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName,
758758 if (!SupportsUnique) {
759759 Flags &= ~ELF::SHF_MERGE;
760760 EntrySize = 0 ;
761- return MCContext::GenericSectionID ;
761+ return MCSection::NonUniqueID ;
762762 }
763763
764764 const bool SymbolMergeable = Flags & ELF::SHF_MERGE;
@@ -770,16 +770,16 @@ calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName,
770770 if (TM.getSeparateNamedSections ())
771771 return NextUniqueID++;
772772 else
773- return MCContext::GenericSectionID ;
773+ return MCSection::NonUniqueID ;
774774 }
775775
776776 // Symbols must be placed into sections with compatible entry sizes. Generate
777777 // unique sections for symbols that have not been assigned to compatible
778778 // sections.
779779 const auto PreviousID =
780780 Ctx.getELFUniqueIDForEntsize (SectionName, Flags, EntrySize);
781- if (PreviousID && (!TM. getSeparateNamedSections () ||
782- *PreviousID == MCContext::GenericSectionID ))
781+ if (PreviousID &&
782+ (!TM. getSeparateNamedSections () || *PreviousID == MCSection::NonUniqueID ))
783783 return *PreviousID;
784784
785785 // If the user has specified the same section name as would be created
@@ -791,7 +791,7 @@ calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName,
791791 if (SymbolMergeable &&
792792 Ctx.isELFImplicitMergeableSectionNamePrefix (SectionName) &&
793793 SectionName.starts_with (ImplicitSectionNameStem))
794- return MCContext::GenericSectionID ;
794+ return MCSection::NonUniqueID ;
795795
796796 // We have seen this section name before, but with different flags or entity
797797 // size. Create a new unique ID.
@@ -903,7 +903,7 @@ static MCSectionELF *selectELFSectionForGlobal(
903903 unsigned EntrySize = getEntrySizeForKind (Kind);
904904
905905 bool UniqueSectionName = false ;
906- unsigned UniqueID = MCContext::GenericSectionID ;
906+ unsigned UniqueID = MCSection::NonUniqueID ;
907907 if (EmitUniqueSection) {
908908 if (TM.getUniqueSectionNames ()) {
909909 UniqueSectionName = true ;
@@ -1073,7 +1073,7 @@ MCSection *TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(
10731073 const Function &F, const MachineBasicBlock &MBB,
10741074 const TargetMachine &TM) const {
10751075 assert (MBB.isBeginSection () && " Basic block does not start a section!" );
1076- unsigned UniqueID = MCContext::GenericSectionID ;
1076+ unsigned UniqueID = MCSection::NonUniqueID ;
10771077
10781078 // For cold sections use the .text.split. prefix along with the parent
10791079 // function name. All cold blocks for the same function go to the same
@@ -1774,7 +1774,7 @@ MCSection *TargetLoweringObjectFileCOFF::SelectSectionForGlobal(
17741774 else
17751775 ComdatGV = GO;
17761776
1777- unsigned UniqueID = MCContext::GenericSectionID ;
1777+ unsigned UniqueID = MCSection::NonUniqueID ;
17781778 if (EmitUniquedSection)
17791779 UniqueID = NextUniqueID++;
17801780
@@ -2220,8 +2220,8 @@ MCSection *TargetLoweringObjectFileWasm::getExplicitSectionGlobal(
22202220 }
22212221
22222222 unsigned Flags = getWasmSectionFlags (Kind, Used.count (GO));
2223- MCSectionWasm *Section = getContext ().getWasmSection (
2224- Name, Kind, Flags, Group, MCContext::GenericSectionID );
2223+ MCSectionWasm *Section = getContext ().getWasmSection (Name, Kind, Flags, Group,
2224+ MCSection::NonUniqueID );
22252225
22262226 return Section;
22272227}
@@ -2249,7 +2249,7 @@ selectWasmSectionForGlobal(MCContext &Ctx, const GlobalObject *GO,
22492249 Name.push_back (' .' );
22502250 TM.getNameWithPrefix (Name, GO, Mang, true );
22512251 }
2252- unsigned UniqueID = MCContext::GenericSectionID ;
2252+ unsigned UniqueID = MCSection::NonUniqueID ;
22532253 if (EmitUniqueSection && !UniqueSectionNames) {
22542254 UniqueID = *NextUniqueID;
22552255 (*NextUniqueID)++;
0 commit comments