Skip to content

Commit 7be8fa3

Browse files
committed
Remove RootSDSection
1 parent f859b78 commit 7be8fa3

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

llvm/include/llvm/MC/MCObjectFileInfo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ class MCObjectFileInfo {
230230
MCSection *GLJMPSection = nullptr;
231231

232232
// GOFF specific sections.
233-
MCSection *RootSDSection = nullptr;
234233
MCSection *PPA2ListSection = nullptr;
235234
MCSection *ADASection = nullptr;
236235
MCSection *IDRLSection = nullptr;

llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,7 +2770,7 @@ void TargetLoweringObjectFileGOFF::getModuleMetadata(Module &M) {
27702770
FileName = FileName.substr(1, FileName.size() - 2);
27712771
DefaultRootSDName = Twine(FileName).concat("#C").str();
27722772
DefaultADAPRName = Twine(FileName).concat("#S").str();
2773-
MCSectionGOFF *RootSD = static_cast<MCSectionGOFF *>(RootSDSection);
2773+
MCSectionGOFF *RootSD = static_cast<MCSectionGOFF *>(TextSection)->getParent();
27742774
MCSectionGOFF *ADAPR = static_cast<MCSectionGOFF *>(ADASection);
27752775
RootSD->setName(DefaultRootSDName);
27762776
ADAPR->setName(DefaultADAPRName);
@@ -2799,7 +2799,7 @@ MCSection *TargetLoweringObjectFileGOFF::getSectionForLSDA(
27992799
GOFF::ESD_NS_Parts, GOFF::ESD_TS_ByteOriented,
28002800
GOFF::ESD_BA_Merge, GOFF::LOADBEHAVIOR, GOFF::ESD_RQ_0,
28012801
GOFF::ESD_ALIGN_Doubleword},
2802-
RootSDSection);
2802+
static_cast<MCSectionGOFF *>(TextSection)->getParent());
28032803
return getContext().getGOFFSection(
28042804
SectionKind::getData(), Name,
28052805
GOFF::PRAttr{true, false, GOFF::ESD_EXE_Unspecified, GOFF::ESD_NS_Parts,

llvm/lib/MC/MCObjectFileInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const Triple &T, bool Large) {
547547
}
548548

549549
void MCObjectFileInfo::initGOFFMCObjectFileInfo(const Triple &T) {
550-
RootSDSection = Ctx->getGOFFSection(
550+
MCSectionGOFF *RootSDSection = Ctx->getGOFFSection(
551551
SectionKind::getMetadata(), "#C",
552552
GOFF::SDAttr{GOFF::ESD_TA_Rent, GOFF::ESD_BSC_Section});
553553

0 commit comments

Comments
 (0)