Skip to content

Commit d1b9b4c

Browse files
authored
[MC] Remove unused NoExecStack parameter from MCStreamer::initSections. NFC (#188184)
Unused after commit 34bc5d5
1 parent 1a5e521 commit d1b9b4c

File tree

17 files changed

+19
-20
lines changed

17 files changed

+19
-20
lines changed

bolt/lib/Core/BinaryContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2628,7 +2628,7 @@ BinaryContext::calculateEmittedSize(BinaryFunction &BF, bool FixBranches) {
26282628
*TheTriple, *LocalCtx, std::unique_ptr<MCAsmBackend>(MAB), std::move(OW),
26292629
std::unique_ptr<MCCodeEmitter>(MCEInstance.MCE.release()), *STI));
26302630

2631-
Streamer->initSections(false, *STI);
2631+
Streamer->initSections(*STI);
26322632

26332633
MCSection *Section = MCEInstance.LocalMOFI->getTextSection();
26342634
Section->setHasInstructions(true);

bolt/lib/Core/BinaryEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class BinaryEmitter {
194194
} // anonymous namespace
195195

196196
void BinaryEmitter::emitAll(StringRef OrgSecPrefix) {
197-
Streamer.initSections(false, *BC.STI);
197+
Streamer.initSections(*BC.STI);
198198
Streamer.setUseAssemblerInfoForParsing(false);
199199

200200
if (opts::UpdateDebugSections && BC.isELF()) {

bolt/lib/Passes/AsmDump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void dumpFunction(const BinaryFunction &BF) {
142142
std::unique_ptr<MCStreamer> AsmStreamer(createAsmStreamer(
143143
*LocalCtx, std::move(FOut), std::move(InstructionPrinter),
144144
std::move(MCEInstance.MCE), std::move(MAB)));
145-
AsmStreamer->initSections(true, *BC.STI);
145+
AsmStreamer->initSections(*BC.STI);
146146
std::unique_ptr<TargetMachine> TM(BC.TheTarget->createTargetMachine(
147147
*BC.TheTriple, "", "", TargetOptions(), std::nullopt));
148148
std::unique_ptr<AsmPrinter> MAP(

llvm/include/llvm/MC/MCELFStreamer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class MCELFStreamer : public MCObjectStreamer {
4747
/// \name MCStreamer Interface
4848
/// @{
4949

50-
void initSections(bool NoExecStack, const MCSubtargetInfo &STI) override;
50+
void initSections(const MCSubtargetInfo &STI) override;
5151
void changeSection(MCSection *Section, uint32_t Subsection = 0) override;
5252
void emitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc()) override;
5353
void emitLabelAtPos(MCSymbol *Symbol, SMLoc Loc, MCFragment &F,

llvm/include/llvm/MC/MCStreamer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ class LLVM_ABI MCStreamer {
468468
void switchSectionNoPrint(MCSection *Section);
469469

470470
/// Create the default sections and set the initial one.
471-
virtual void initSections(bool NoExecStack, const MCSubtargetInfo &STI);
471+
virtual void initSections(const MCSubtargetInfo &STI);
472472

473473
MCSymbol *endSection(MCSection *Section);
474474

llvm/include/llvm/MC/MCWinCOFFStreamer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class MCWinCOFFStreamer : public MCObjectStreamer {
4242
/// \name MCStreamer interface
4343
/// \{
4444

45-
void initSections(bool NoExecStack, const MCSubtargetInfo &STI) override;
45+
void initSections(const MCSubtargetInfo &STI) override;
4646
void changeSection(MCSection *Section, uint32_t Subsection = 0) override;
4747
void emitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc()) override;
4848
bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ bool AsmPrinter::doInitialization(Module &M) {
556556
// information (such as the embedded command line) to be associated
557557
// with all sections in the object file rather than a single section.
558558
if (!Target.isOSBinFormatXCOFF())
559-
OutStreamer->initSections(false, *TM.getMCSubtargetInfo());
559+
OutStreamer->initSections(*TM.getMCSubtargetInfo());
560560

561561
// Emit the version-min deployment target directive if needed.
562562
//

llvm/lib/MC/MCELFStreamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ELFObjectWriter &MCELFStreamer::getWriter() {
4949
return static_cast<ELFObjectWriter &>(getAssembler().getWriter());
5050
}
5151

52-
void MCELFStreamer::initSections(bool, const MCSubtargetInfo &STI) {
52+
void MCELFStreamer::initSections(const MCSubtargetInfo &STI) {
5353
MCContext &Ctx = getContext();
5454
switchSection(Ctx.getObjectFileInfo()->getTextSection());
5555
emitCodeAlignment(Align(Ctx.getObjectFileInfo()->getTextSectionAlignment()),

llvm/lib/MC/MCParser/AsmParser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
942942

943943
// Create the initial section, if requested.
944944
if (!NoInitialTextSection)
945-
Out.initSections(false, getTargetParser().getSTI());
945+
Out.initSections(getTargetParser().getSTI());
946946

947947
// Prime the lexer.
948948
Lex();
@@ -1056,7 +1056,7 @@ bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
10561056

10571057
bool AsmParser::checkForValidSection() {
10581058
if (!ParsingMSInlineAsm && !getStreamer().getCurrentFragment()) {
1059-
Out.initSections(false, getTargetParser().getSTI());
1059+
Out.initSections(getTargetParser().getSTI());
10601060
return Error(getTok().getLoc(),
10611061
"expected section directive before assembly directive");
10621062
}

llvm/lib/MC/MCParser/MasmParser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ const AsmToken MasmParser::peekTok(bool ShouldSkipSpace) {
12031203
bool MasmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
12041204
// Create the initial section, if requested.
12051205
if (!NoInitialTextSection)
1206-
Out.initSections(false, getTargetParser().getSTI());
1206+
Out.initSections(getTargetParser().getSTI());
12071207

12081208
// Prime the lexer.
12091209
Lex();
@@ -1273,7 +1273,7 @@ bool MasmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
12731273
bool MasmParser::checkForValidSection() {
12741274
if (!ParsingMSInlineAsm && !(getStreamer().getCurrentFragment() &&
12751275
getStreamer().getCurrentSectionOnly())) {
1276-
Out.initSections(false, getTargetParser().getSTI());
1276+
Out.initSections(getTargetParser().getSTI());
12771277
return Error(getTok().getLoc(),
12781278
"expected section directive before assembly directive");
12791279
}

0 commit comments

Comments
 (0)