mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
InitToTextSection is redundant with InitSections. Remove it.
llvm-svn: 199955
This commit is contained in:
parent
16c9a612bc
commit
d04868d854
@ -46,7 +46,6 @@ public:
|
||||
/// @{
|
||||
|
||||
virtual void InitSections();
|
||||
virtual void InitToTextSection();
|
||||
virtual void ChangeSection(const MCSection *Section,
|
||||
const MCExpr *Subsection);
|
||||
virtual void EmitLabel(MCSymbol *Symbol);
|
||||
|
@ -344,9 +344,6 @@ public:
|
||||
/// InitSections - Create the default sections and set the initial one.
|
||||
virtual void InitSections() = 0;
|
||||
|
||||
/// InitToTextSection - Create a text section and switch the streamer to it.
|
||||
virtual void InitToTextSection() = 0;
|
||||
|
||||
/// AssignSection - Sets the symbol's section.
|
||||
///
|
||||
/// Each emitted symbol will be tracked in the ordering table,
|
||||
|
@ -686,7 +686,6 @@ public:
|
||||
// Noop calls.
|
||||
virtual void ChangeSection(const MCSection *Section,
|
||||
const MCExpr *Subsection) {}
|
||||
virtual void InitToTextSection() {}
|
||||
virtual void InitSections() {}
|
||||
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) {}
|
||||
virtual void EmitThumbFunc(MCSymbol *Func) {}
|
||||
|
@ -129,10 +129,6 @@ public:
|
||||
const MCExpr *Subsection);
|
||||
|
||||
virtual void InitSections() {
|
||||
InitToTextSection();
|
||||
}
|
||||
|
||||
virtual void InitToTextSection() {
|
||||
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
|
||||
}
|
||||
|
||||
|
@ -53,10 +53,6 @@ inline void MCELFStreamer::SetSectionBss() {
|
||||
MCELFStreamer::~MCELFStreamer() {
|
||||
}
|
||||
|
||||
void MCELFStreamer::InitToTextSection() {
|
||||
SetSectionText();
|
||||
}
|
||||
|
||||
void MCELFStreamer::InitSections() {
|
||||
// This emulates the same behavior of GNU as. This makes it easier
|
||||
// to compare the output as the major sections are in the same order.
|
||||
|
@ -44,7 +44,6 @@ public:
|
||||
/// @{
|
||||
|
||||
virtual void InitSections();
|
||||
virtual void InitToTextSection();
|
||||
virtual void EmitLabel(MCSymbol *Symbol);
|
||||
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
||||
virtual void EmitEHSymAttributes(const MCSymbol *Symbol,
|
||||
@ -96,10 +95,6 @@ public:
|
||||
} // end anonymous namespace.
|
||||
|
||||
void MCMachOStreamer::InitSections() {
|
||||
InitToTextSection();
|
||||
}
|
||||
|
||||
void MCMachOStreamer::InitToTextSection() {
|
||||
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
|
||||
}
|
||||
|
||||
|
@ -24,9 +24,6 @@ namespace {
|
||||
/// @name MCStreamer Interface
|
||||
/// @{
|
||||
|
||||
virtual void InitToTextSection() {
|
||||
}
|
||||
|
||||
virtual void InitSections() {
|
||||
}
|
||||
|
||||
|
@ -698,7 +698,7 @@ bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
|
||||
void AsmParser::checkForValidSection() {
|
||||
if (!ParsingInlineAsm && !getStreamer().getCurrentSection().first) {
|
||||
TokError("expected section directive before assembly directive");
|
||||
Out.InitToTextSection();
|
||||
Out.InitSections();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,6 @@ public:
|
||||
/// @{
|
||||
|
||||
virtual void InitSections();
|
||||
virtual void InitToTextSection();
|
||||
virtual void EmitLabel(MCSymbol *Symbol);
|
||||
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
||||
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
|
||||
@ -106,10 +105,6 @@ public:
|
||||
} // end anonymous namespace.
|
||||
|
||||
void MCPureStreamer::InitSections() {
|
||||
InitToTextSection();
|
||||
}
|
||||
|
||||
void MCPureStreamer::InitToTextSection() {
|
||||
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,6 @@ public:
|
||||
// MCStreamer interface
|
||||
|
||||
virtual void InitSections();
|
||||
virtual void InitToTextSection();
|
||||
virtual void EmitLabel(MCSymbol *Symbol);
|
||||
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
||||
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag);
|
||||
@ -151,10 +150,6 @@ void WinCOFFStreamer::AddCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||
|
||||
// MCStreamer interface
|
||||
|
||||
void WinCOFFStreamer::InitToTextSection() {
|
||||
SetSectionText();
|
||||
}
|
||||
|
||||
void WinCOFFStreamer::InitSections() {
|
||||
SetSectionText();
|
||||
SetSectionData();
|
||||
|
@ -8851,7 +8851,7 @@ bool ARMAsmParser::parseDirectiveEven(SMLoc L) {
|
||||
}
|
||||
|
||||
if (!Section) {
|
||||
getStreamer().InitToTextSection();
|
||||
getStreamer().InitSections();
|
||||
Section = getStreamer().getCurrentSection().first;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user