@@ -2157,8 +2157,9 @@ MCSection *TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal(
2157
2157
else
2158
2158
report_fatal_error (" XCOFF other section types not yet implemented." );
2159
2159
2160
- return getContext ().getXCOFFSection (SectionName, MappingClass, XCOFF::XTY_SD,
2161
- Kind, /* MultiSymbolsAllowed*/ true );
2160
+ return getContext ().getXCOFFSection (
2161
+ SectionName, Kind, XCOFF::CsectProperties (MappingClass, XCOFF::XTY_SD),
2162
+ /* MultiSymbolsAllowed*/ true );
2162
2163
}
2163
2164
2164
2165
MCSection *TargetLoweringObjectFileXCOFF::getSectionForExternalReference (
@@ -2171,8 +2172,9 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForExternalReference(
2171
2172
2172
2173
// Externals go into a csect of type ER.
2173
2174
return getContext ().getXCOFFSection (
2174
- Name, isa<Function>(GO) ? XCOFF::XMC_DS : XCOFF::XMC_UA, XCOFF::XTY_ER,
2175
- SectionKind::getMetadata ());
2175
+ Name, SectionKind::getMetadata (),
2176
+ XCOFF::CsectProperties (isa<Function>(GO) ? XCOFF::XMC_DS : XCOFF::XMC_UA,
2177
+ XCOFF::XTY_ER));
2176
2178
}
2177
2179
2178
2180
MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal (
@@ -2183,8 +2185,9 @@ MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(
2183
2185
SmallString<128 > Name;
2184
2186
getNameWithPrefix (Name, GO, TM);
2185
2187
return getContext ().getXCOFFSection (
2186
- Name, Kind.isBSSLocal () ? XCOFF::XMC_BS : XCOFF::XMC_RW, XCOFF::XTY_CM,
2187
- Kind);
2188
+ Name, Kind,
2189
+ XCOFF::CsectProperties (
2190
+ Kind.isBSSLocal () ? XCOFF::XMC_BS : XCOFF::XMC_RW, XCOFF::XTY_CM));
2188
2191
}
2189
2192
2190
2193
if (Kind.isMergeableCString ()) {
@@ -2200,7 +2203,7 @@ MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(
2200
2203
getNameWithPrefix (Name, GO, TM);
2201
2204
2202
2205
return getContext ().getXCOFFSection (
2203
- Name, XCOFF::XMC_RO, XCOFF::XTY_SD, Kind ,
2206
+ Name, Kind, XCOFF::CsectProperties (XCOFF:: XMC_RO, XCOFF::XTY_SD) ,
2204
2207
/* MultiSymbolsAllowed*/ !TM.getDataSections ());
2205
2208
}
2206
2209
@@ -2223,8 +2226,9 @@ MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(
2223
2226
if (TM.getDataSections ()) {
2224
2227
SmallString<128 > Name;
2225
2228
getNameWithPrefix (Name, GO, TM);
2226
- return getContext ().getXCOFFSection (Name, XCOFF::XMC_RW, XCOFF::XTY_SD,
2227
- SectionKind::getData ());
2229
+ return getContext ().getXCOFFSection (
2230
+ Name, SectionKind::getData (),
2231
+ XCOFF::CsectProperties (XCOFF::XMC_RW, XCOFF::XTY_SD));
2228
2232
}
2229
2233
return DataSection;
2230
2234
}
@@ -2233,8 +2237,9 @@ MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(
2233
2237
if (TM.getDataSections ()) {
2234
2238
SmallString<128 > Name;
2235
2239
getNameWithPrefix (Name, GO, TM);
2236
- return getContext ().getXCOFFSection (Name, XCOFF::XMC_RO, XCOFF::XTY_SD,
2237
- SectionKind::getReadOnly ());
2240
+ return getContext ().getXCOFFSection (
2241
+ Name, SectionKind::getReadOnly (),
2242
+ XCOFF::CsectProperties (XCOFF::XMC_RO, XCOFF::XTY_SD));
2238
2243
}
2239
2244
return ReadOnlySection;
2240
2245
}
@@ -2253,8 +2258,9 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForJumpTable(
2253
2258
// the table doesn't prevent the removal.
2254
2259
SmallString<128 > NameStr (" .rodata.jmp.." );
2255
2260
getNameWithPrefix (NameStr, &F, TM);
2256
- return getContext ().getXCOFFSection (NameStr, XCOFF::XMC_RO, XCOFF::XTY_SD,
2257
- SectionKind::getReadOnly ());
2261
+ return getContext ().getXCOFFSection (
2262
+ NameStr, SectionKind::getReadOnly (),
2263
+ XCOFF::CsectProperties (XCOFF::XMC_RO, XCOFF::XTY_SD));
2258
2264
}
2259
2265
2260
2266
bool TargetLoweringObjectFileXCOFF::shouldPutJumpTableInFunctionSection (
@@ -2345,9 +2351,11 @@ MCSymbol *TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol(
2345
2351
Func->isDeclaration ()) &&
2346
2352
isa<Function>(Func)) {
2347
2353
return getContext ()
2348
- .getXCOFFSection (NameStr, XCOFF::XMC_PR,
2349
- Func->isDeclaration () ? XCOFF::XTY_ER : XCOFF::XTY_SD,
2350
- SectionKind::getText ())
2354
+ .getXCOFFSection (
2355
+ NameStr, SectionKind::getText (),
2356
+ XCOFF::CsectProperties (XCOFF::XMC_PR, Func->isDeclaration ()
2357
+ ? XCOFF::XTY_ER
2358
+ : XCOFF::XTY_SD))
2351
2359
->getQualNameSymbol ();
2352
2360
}
2353
2361
@@ -2358,16 +2366,18 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForFunctionDescriptor(
2358
2366
const Function *F, const TargetMachine &TM) const {
2359
2367
SmallString<128 > NameStr;
2360
2368
getNameWithPrefix (NameStr, F, TM);
2361
- return getContext ().getXCOFFSection (NameStr, XCOFF::XMC_DS, XCOFF::XTY_SD,
2362
- SectionKind::getData ());
2369
+ return getContext ().getXCOFFSection (
2370
+ NameStr, SectionKind::getData (),
2371
+ XCOFF::CsectProperties (XCOFF::XMC_DS, XCOFF::XTY_SD));
2363
2372
}
2364
2373
2365
2374
MCSection *TargetLoweringObjectFileXCOFF::getSectionForTOCEntry (
2366
2375
const MCSymbol *Sym, const TargetMachine &TM) const {
2367
2376
// Use TE storage-mapping class when large code model is enabled so that
2368
2377
// the chance of needing -bbigtoc is decreased.
2369
2378
return getContext ().getXCOFFSection (
2370
- cast<MCSymbolXCOFF>(Sym)->getSymbolTableName (),
2371
- TM.getCodeModel () == CodeModel::Large ? XCOFF::XMC_TE : XCOFF::XMC_TC,
2372
- XCOFF::XTY_SD, SectionKind::getData ());
2379
+ cast<MCSymbolXCOFF>(Sym)->getSymbolTableName (), SectionKind::getData (),
2380
+ XCOFF::CsectProperties (
2381
+ TM.getCodeModel () == CodeModel::Large ? XCOFF::XMC_TE : XCOFF::XMC_TC,
2382
+ XCOFF::XTY_SD));
2373
2383
}
0 commit comments