Skip to content

Commit 0eec88f

Browse files
committed
Remove constants.
1 parent e413983 commit 0eec88f

File tree

3 files changed

+14
-27
lines changed

3 files changed

+14
-27
lines changed

llvm/include/llvm/MC/MCGOFFAttributes.h

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,25 +80,12 @@ struct PRAttr {
8080
uint32_t SortKey = 0;
8181
};
8282

83-
// Class names and other values depending on AMODE64 or AMODE31, and other
84-
// environment properties. For now, only the 64 bit XPLINK case is defined.
85-
86-
// GOFF classes.
83+
// Predefined GOFF class names.
8784
constexpr StringLiteral CLASS_CODE = "C_CODE64";
8885
constexpr StringLiteral CLASS_WSA = "C_WSA64";
8986
constexpr StringLiteral CLASS_DATA = "C_DATA64";
9087
constexpr StringLiteral CLASS_PPA2 = "C_@@QPPA2";
9188

92-
// Addres and residency mode.
93-
constexpr GOFF::ESDAmode AMODE = GOFF::ESD_AMODE_64;
94-
constexpr GOFF::ESDRmode RMODE = GOFF::ESD_RMODE_64;
95-
96-
// Linkage.
97-
constexpr GOFF::ESDLinkageType LINKAGE = GOFF::ESD_LT_XPLink;
98-
99-
// Loadding behavior.
100-
constexpr GOFF::ESDLoadingBehavior LOADBEHAVIOR = GOFF::ESD_LB_Initial;
101-
10289
} // namespace GOFF
10390
} // namespace llvm
10491

llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2795,9 +2795,9 @@ void TargetLoweringObjectFileGOFF::getModuleMetadata(Module &M) {
27952795
// Initialize the label for the text section.
27962796
MCSymbolGOFF *TextLD = static_cast<MCSymbolGOFF *>(
27972797
getContext().getOrCreateSymbol(RootSD->getName()));
2798-
TextLD->setLDAttributes(GOFF::LDAttr{false, GOFF::ESD_EXE_CODE,
2799-
GOFF::ESD_BST_Strong, GOFF::LINKAGE,
2800-
GOFF::AMODE, GOFF::ESD_BSC_Section});
2798+
TextLD->setLDAttributes(GOFF::LDAttr{
2799+
false, GOFF::ESD_EXE_CODE, GOFF::ESD_BST_Strong, GOFF::ESD_LT_XPLink,
2800+
GOFF::ESD_AMODE_64, GOFF::ESD_BSC_Section});
28012801
TextLD->setADA(ADAPR);
28022802
TextSection->setBeginSymbol(TextLD);
28032803
}
@@ -2813,14 +2813,14 @@ MCSection *TargetLoweringObjectFileGOFF::getSectionForLSDA(
28132813

28142814
MCSectionGOFF *WSA = getContext().getGOFFSection(
28152815
SectionKind::getMetadata(), GOFF::CLASS_WSA,
2816-
GOFF::EDAttr{false, GOFF::RMODE, GOFF::ESD_NS_Parts,
2816+
GOFF::EDAttr{false, GOFF::ESD_RMODE_64, GOFF::ESD_NS_Parts,
28172817
GOFF::ESD_TS_ByteOriented, GOFF::ESD_BA_Merge,
2818-
GOFF::LOADBEHAVIOR, GOFF::ESD_RQ_0, GOFF::ESD_ALIGN_Fullword,
2819-
0},
2818+
GOFF::ESD_LB_Initial, GOFF::ESD_RQ_0,
2819+
GOFF::ESD_ALIGN_Fullword, 0},
28202820
static_cast<MCSectionGOFF *>(TextSection)->getParent());
28212821
return getContext().getGOFFSection(SectionKind::getData(), Name,
28222822
GOFF::PRAttr{true, GOFF::ESD_EXE_DATA,
2823-
GOFF::LINKAGE,
2823+
GOFF::ESD_LT_XPLink,
28242824
GOFF::ESD_BSC_Section, 0},
28252825
WSA);
28262826
}
@@ -2846,13 +2846,13 @@ MCSection *TargetLoweringObjectFileGOFF::SelectSectionForGlobal(
28462846
GOFF::SDAttr{GOFF::ESD_TA_Unspecified, SDBindingScope});
28472847
MCSectionGOFF *ED = getContext().getGOFFSection(
28482848
SectionKind::getMetadata(), GOFF::CLASS_WSA,
2849-
GOFF::EDAttr{false, GOFF::RMODE, GOFF::ESD_NS_Parts,
2849+
GOFF::EDAttr{false, GOFF::ESD_RMODE_64, GOFF::ESD_NS_Parts,
28502850
GOFF::ESD_TS_ByteOriented, GOFF::ESD_BA_Merge,
28512851
GOFF::ESD_LB_Deferred, GOFF::ESD_RQ_0, Align, 0},
28522852
SD);
28532853
return getContext().getGOFFSection(Kind, Symbol->getName(),
28542854
GOFF::PRAttr{false, GOFF::ESD_EXE_DATA,
2855-
GOFF::LINKAGE,
2855+
GOFF::ESD_LT_XPLink,
28562856
PRBindingScope, 0},
28572857
ED);
28582858
}

llvm/lib/MC/MCObjectFileInfo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ void MCObjectFileInfo::initGOFFMCObjectFileInfo(const Triple &T) {
553553

554554
MCSectionGOFF *ADAEDSection = Ctx->getGOFFSection(
555555
SectionKind::getMetadata(), GOFF::CLASS_WSA,
556-
GOFF::EDAttr{false, GOFF::RMODE, GOFF::ESD_NS_Parts,
556+
GOFF::EDAttr{false, GOFF::ESD_RMODE_64, GOFF::ESD_NS_Parts,
557557
GOFF::ESD_TS_ByteOriented, GOFF::ESD_BA_Merge,
558558
GOFF::ESD_LB_Deferred, GOFF::ESD_RQ_1,
559559
GOFF::ESD_ALIGN_Quadword, 0},
@@ -566,15 +566,15 @@ void MCObjectFileInfo::initGOFFMCObjectFileInfo(const Triple &T) {
566566

567567
TextSection = Ctx->getGOFFSection(
568568
SectionKind::getText(), GOFF::CLASS_CODE,
569-
GOFF::EDAttr{true, GOFF::RMODE, GOFF::ESD_NS_NormalName,
569+
GOFF::EDAttr{true, GOFF::ESD_RMODE_64, GOFF::ESD_NS_NormalName,
570570
GOFF::ESD_TS_ByteOriented, GOFF::ESD_BA_Concatenate,
571571
GOFF::ESD_LB_Initial, GOFF::ESD_RQ_0,
572572
GOFF::ESD_ALIGN_Doubleword, 0},
573573
RootSDSection);
574574

575575
MCSectionGOFF *PPA2ListEDSection = Ctx->getGOFFSection(
576576
SectionKind::getMetadata(), GOFF::CLASS_PPA2,
577-
GOFF::EDAttr{true, GOFF::RMODE, GOFF::ESD_NS_Parts,
577+
GOFF::EDAttr{true, GOFF::ESD_RMODE_64, GOFF::ESD_NS_Parts,
578578
GOFF::ESD_TS_ByteOriented, GOFF::ESD_BA_Merge,
579579
GOFF::ESD_LB_Initial, GOFF::ESD_RQ_0,
580580
GOFF::ESD_ALIGN_Doubleword, 0},
@@ -587,7 +587,7 @@ void MCObjectFileInfo::initGOFFMCObjectFileInfo(const Triple &T) {
587587

588588
IDRLSection = Ctx->getGOFFSection(
589589
SectionKind::getData(), "B_IDRL",
590-
GOFF::EDAttr{true, GOFF::RMODE, GOFF::ESD_NS_NormalName,
590+
GOFF::EDAttr{true, GOFF::ESD_RMODE_64, GOFF::ESD_NS_NormalName,
591591
GOFF::ESD_TS_Structured, GOFF::ESD_BA_Concatenate,
592592
GOFF::ESD_LB_NoLoad, GOFF::ESD_RQ_0,
593593
GOFF::ESD_ALIGN_Doubleword, 0},

0 commit comments

Comments
 (0)