Skip to content

Commit bdbc098

Browse files
committed
MCObjectStreamer: Remove changeSectionImpl
1 parent b21f14e commit bdbc098

File tree

5 files changed

+4
-13
lines changed

5 files changed

+4
-13
lines changed

llvm/include/llvm/MC/MCObjectStreamer.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ class MCObjectStreamer : public MCStreamer {
7272
MCSymbol *emitCFILabel() override;
7373
void emitCFISections(bool EH, bool Debug) override;
7474

75-
protected:
76-
bool changeSectionImpl(MCSection *Section, uint32_t Subsection);
77-
7875
public:
7976
void visitUsedSymbol(const MCSymbol &Sym) override;
8077

llvm/lib/MC/MCELFStreamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void MCELFStreamer::changeSection(MCSection *Section, uint32_t Subsection) {
8888
if (SectionELF->getFlags() & ELF::SHF_GNU_RETAIN)
8989
getWriter().markGnuAbi();
9090

91-
changeSectionImpl(Section, Subsection);
91+
MCObjectStreamer::changeSection(Section, Subsection);
9292
Asm.registerSymbol(*Section->getBeginSymbol());
9393
}
9494

llvm/lib/MC/MCMachOStreamer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ class MCMachOStreamer : public MCObjectStreamer {
132132
} // end anonymous namespace.
133133

134134
void MCMachOStreamer::changeSection(MCSection *Section, uint32_t Subsection) {
135-
// Change the section normally.
136-
changeSectionImpl(Section, Subsection);
135+
MCObjectStreamer::changeSection(Section, Subsection);
137136

138137
// Output a linker-local symbol so we don't need section-relative local
139138
// relocations. The linker hates us when we do that.

llvm/lib/MC/MCObjectStreamer.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,6 @@ void MCObjectStreamer::emitWeakReference(MCSymbol *Alias,
224224
}
225225

226226
void MCObjectStreamer::changeSection(MCSection *Section, uint32_t Subsection) {
227-
changeSectionImpl(Section, Subsection);
228-
}
229-
230-
bool MCObjectStreamer::changeSectionImpl(MCSection *Section,
231-
uint32_t Subsection) {
232227
assert(Section && "Cannot switch to a null section!");
233228
getContext().clearDwarfLocSeen();
234229

@@ -247,7 +242,7 @@ bool MCObjectStreamer::changeSectionImpl(MCSection *Section,
247242
Section->CurFragList = &Subsections[I].second;
248243
CurFrag = Section->CurFragList->Tail;
249244

250-
return getAssembler().registerSection(*Section);
245+
getAssembler().registerSection(*Section);
251246
}
252247

253248
void MCObjectStreamer::switchSectionNoPrint(MCSection *Section) {

llvm/lib/MC/MCWinCOFFStreamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ void MCWinCOFFStreamer::initSections(bool NoExecStack,
153153
}
154154

155155
void MCWinCOFFStreamer::changeSection(MCSection *Section, uint32_t Subsection) {
156-
changeSectionImpl(Section, Subsection);
156+
MCObjectStreamer::changeSection(Section, Subsection);
157157
// Ensure that the first and the second symbols relative to the section are
158158
// the section symbol and the COMDAT symbol.
159159
getAssembler().registerSymbol(*Section->getBeginSymbol());

0 commit comments

Comments
 (0)