Skip to content

Commit f51870f

Browse files
MaskRayAlexisPerry
authored andcommitted
[MC] Remove unneeded setBeginSymbol. NFC
getELFSection ensures that the section symbol exists.
1 parent 1a7c741 commit f51870f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

llvm/lib/MC/MCParser/ELFAsmParser.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -716,16 +716,8 @@ bool ELFAsmParser::ParseSectionArguments(bool IsPush, SMLoc loc) {
716716
(Section->getFlags() & ELF::SHF_ALLOC) &&
717717
(Section->getFlags() & ELF::SHF_EXECINSTR)) {
718718
bool InsertResult = getContext().addGenDwarfSection(Section);
719-
if (InsertResult) {
720-
if (getContext().getDwarfVersion() <= 2)
721-
Warning(loc, "DWARF2 only supports one section per compilation unit");
722-
723-
if (!Section->getBeginSymbol()) {
724-
MCSymbol *SectionStartSymbol = getContext().createTempSymbol();
725-
getStreamer().emitLabel(SectionStartSymbol);
726-
Section->setBeginSymbol(SectionStartSymbol);
727-
}
728-
}
719+
if (InsertResult && getContext().getDwarfVersion() <= 2)
720+
Warning(loc, "DWARF2 only supports one section per compilation unit");
729721
}
730722

731723
return false;

0 commit comments

Comments
 (0)