Skip to content

Commit f358e40

Browse files
committed
Fix formatting and assertions
1 parent 7be8fa3 commit f358e40

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ class TargetLoweringObjectFileXCOFF : public TargetLoweringObjectFile {
318318
class TargetLoweringObjectFileGOFF : public TargetLoweringObjectFile {
319319
std::string DefaultRootSDName;
320320
std::string DefaultADAPRName;
321+
321322
public:
322323
TargetLoweringObjectFileGOFF();
323324
~TargetLoweringObjectFileGOFF() override = default;

llvm/include/llvm/MC/MCSectionGOFF.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ class MCSectionGOFF final : public MCSection {
9090

9191
// Accessors to the attributes.
9292
GOFF::SDAttr getSDAttributes() const {
93-
assert(SymbolType == GOFF::ESD_ST_SectionDefinition && "Not PR symbol");
93+
assert(isSD() && "Not a SD section");
9494
return SDAttributes;
9595
}
9696
GOFF::EDAttr getEDAttributes() const {
97-
assert(SymbolType == GOFF::ESD_ST_ElementDefinition && "Not PR symbol");
97+
assert(isED() && "Not a ED section");
9898
return EDAttributes;
9999
}
100100
GOFF::PRAttr getPRAttributes() const {
101-
assert(SymbolType == GOFF::ESD_ST_PartReference && "Not PR symbol");
101+
assert(isPR() && "Not a PR section");
102102
return PRAttributes;
103103
}
104104

llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2770,7 +2770,8 @@ 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 *>(TextSection)->getParent();
2773+
MCSectionGOFF *RootSD =
2774+
static_cast<MCSectionGOFF *>(TextSection)->getParent();
27742775
MCSectionGOFF *ADAPR = static_cast<MCSectionGOFF *>(ADASection);
27752776
RootSD->setName(DefaultRootSDName);
27762777
ADAPR->setName(DefaultADAPRName);

llvm/lib/MC/MCGOFFStreamer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ void registerSectionHierarchy(MCAssembler &Asm, MCSectionGOFF *Section) {
3939
} // namespace
4040

4141
void MCGOFFStreamer::changeSection(MCSection *Section, uint32_t Subsection) {
42-
registerSectionHierarchy(getAssembler(), static_cast<MCSectionGOFF *>(Section));
42+
registerSectionHierarchy(getAssembler(),
43+
static_cast<MCSectionGOFF *>(Section));
4344
MCObjectStreamer::changeSection(Section, Subsection);
4445
}
4546

0 commit comments

Comments
 (0)