@@ -758,7 +758,7 @@ calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName,
758
758
if (!SupportsUnique) {
759
759
Flags &= ~ELF::SHF_MERGE;
760
760
EntrySize = 0 ;
761
- return MCContext::GenericSectionID ;
761
+ return MCSection::NonUniqueID ;
762
762
}
763
763
764
764
const bool SymbolMergeable = Flags & ELF::SHF_MERGE;
@@ -770,16 +770,16 @@ calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName,
770
770
if (TM.getSeparateNamedSections ())
771
771
return NextUniqueID++;
772
772
else
773
- return MCContext::GenericSectionID ;
773
+ return MCSection::NonUniqueID ;
774
774
}
775
775
776
776
// Symbols must be placed into sections with compatible entry sizes. Generate
777
777
// unique sections for symbols that have not been assigned to compatible
778
778
// sections.
779
779
const auto PreviousID =
780
780
Ctx.getELFUniqueIDForEntsize (SectionName, Flags, EntrySize);
781
- if (PreviousID && (!TM. getSeparateNamedSections () ||
782
- *PreviousID == MCContext::GenericSectionID ))
781
+ if (PreviousID &&
782
+ (!TM. getSeparateNamedSections () || *PreviousID == MCSection::NonUniqueID ))
783
783
return *PreviousID;
784
784
785
785
// If the user has specified the same section name as would be created
@@ -791,7 +791,7 @@ calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName,
791
791
if (SymbolMergeable &&
792
792
Ctx.isELFImplicitMergeableSectionNamePrefix (SectionName) &&
793
793
SectionName.starts_with (ImplicitSectionNameStem))
794
- return MCContext::GenericSectionID ;
794
+ return MCSection::NonUniqueID ;
795
795
796
796
// We have seen this section name before, but with different flags or entity
797
797
// size. Create a new unique ID.
@@ -903,7 +903,7 @@ static MCSectionELF *selectELFSectionForGlobal(
903
903
unsigned EntrySize = getEntrySizeForKind (Kind);
904
904
905
905
bool UniqueSectionName = false ;
906
- unsigned UniqueID = MCContext::GenericSectionID ;
906
+ unsigned UniqueID = MCSection::NonUniqueID ;
907
907
if (EmitUniqueSection) {
908
908
if (TM.getUniqueSectionNames ()) {
909
909
UniqueSectionName = true ;
@@ -1073,7 +1073,7 @@ MCSection *TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(
1073
1073
const Function &F, const MachineBasicBlock &MBB,
1074
1074
const TargetMachine &TM) const {
1075
1075
assert (MBB.isBeginSection () && " Basic block does not start a section!" );
1076
- unsigned UniqueID = MCContext::GenericSectionID ;
1076
+ unsigned UniqueID = MCSection::NonUniqueID ;
1077
1077
1078
1078
// For cold sections use the .text.split. prefix along with the parent
1079
1079
// function name. All cold blocks for the same function go to the same
@@ -1774,7 +1774,7 @@ MCSection *TargetLoweringObjectFileCOFF::SelectSectionForGlobal(
1774
1774
else
1775
1775
ComdatGV = GO;
1776
1776
1777
- unsigned UniqueID = MCContext::GenericSectionID ;
1777
+ unsigned UniqueID = MCSection::NonUniqueID ;
1778
1778
if (EmitUniquedSection)
1779
1779
UniqueID = NextUniqueID++;
1780
1780
@@ -2220,8 +2220,8 @@ MCSection *TargetLoweringObjectFileWasm::getExplicitSectionGlobal(
2220
2220
}
2221
2221
2222
2222
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 );
2225
2225
2226
2226
return Section;
2227
2227
}
@@ -2249,7 +2249,7 @@ selectWasmSectionForGlobal(MCContext &Ctx, const GlobalObject *GO,
2249
2249
Name.push_back (' .' );
2250
2250
TM.getNameWithPrefix (Name, GO, Mang, true );
2251
2251
}
2252
- unsigned UniqueID = MCContext::GenericSectionID ;
2252
+ unsigned UniqueID = MCSection::NonUniqueID ;
2253
2253
if (EmitUniqueSection && !UniqueSectionNames) {
2254
2254
UniqueID = *NextUniqueID;
2255
2255
(*NextUniqueID)++;
0 commit comments