[llvm] r199955 - InitToTextSection is redundant with InitSections. Remove it.
Rafael Espindola
rafael.espindola at gmail.com
Thu Jan 23 15:14:15 PST 2014
Author: rafael
Date: Thu Jan 23 17:14:14 2014
New Revision: 199955
URL: http://llvm.org/viewvc/llvm-project?rev=199955&view=rev
Log:
InitToTextSection is redundant with InitSections. Remove it.
Modified:
llvm/trunk/include/llvm/MC/MCELFStreamer.h
llvm/trunk/include/llvm/MC/MCStreamer.h
llvm/trunk/lib/LTO/LTOModule.cpp
llvm/trunk/lib/MC/MCAsmStreamer.cpp
llvm/trunk/lib/MC/MCELFStreamer.cpp
llvm/trunk/lib/MC/MCMachOStreamer.cpp
llvm/trunk/lib/MC/MCNullStreamer.cpp
llvm/trunk/lib/MC/MCParser/AsmParser.cpp
llvm/trunk/lib/MC/MCPureStreamer.cpp
llvm/trunk/lib/MC/WinCOFFStreamer.cpp
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Modified: llvm/trunk/include/llvm/MC/MCELFStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCELFStreamer.h?rev=199955&r1=199954&r2=199955&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCELFStreamer.h (original)
+++ llvm/trunk/include/llvm/MC/MCELFStreamer.h Thu Jan 23 17:14:14 2014
@@ -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);
Modified: llvm/trunk/include/llvm/MC/MCStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=199955&r1=199954&r2=199955&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCStreamer.h (original)
+++ llvm/trunk/include/llvm/MC/MCStreamer.h Thu Jan 23 17:14:14 2014
@@ -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,
Modified: llvm/trunk/lib/LTO/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOModule.cpp?rev=199955&r1=199954&r2=199955&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTOModule.cpp (original)
+++ llvm/trunk/lib/LTO/LTOModule.cpp Thu Jan 23 17:14:14 2014
@@ -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) {}
Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=199955&r1=199954&r2=199955&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Thu Jan 23 17:14:14 2014
@@ -129,10 +129,6 @@ public:
const MCExpr *Subsection);
virtual void InitSections() {
- InitToTextSection();
- }
-
- virtual void InitToTextSection() {
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
}
Modified: llvm/trunk/lib/MC/MCELFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCELFStreamer.cpp?rev=199955&r1=199954&r2=199955&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCELFStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCELFStreamer.cpp Thu Jan 23 17:14:14 2014
@@ -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.
Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCMachOStreamer.cpp?rev=199955&r1=199954&r2=199955&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCMachOStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCMachOStreamer.cpp Thu Jan 23 17:14:14 2014
@@ -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());
}
Modified: llvm/trunk/lib/MC/MCNullStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCNullStreamer.cpp?rev=199955&r1=199954&r2=199955&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCNullStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCNullStreamer.cpp Thu Jan 23 17:14:14 2014
@@ -24,9 +24,6 @@ namespace {
/// @name MCStreamer Interface
/// @{
- virtual void InitToTextSection() {
- }
-
virtual void InitSections() {
}
Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=199955&r1=199954&r2=199955&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Thu Jan 23 17:14:14 2014
@@ -698,7 +698,7 @@ bool AsmParser::Run(bool NoInitialTextSe
void AsmParser::checkForValidSection() {
if (!ParsingInlineAsm && !getStreamer().getCurrentSection().first) {
TokError("expected section directive before assembly directive");
- Out.InitToTextSection();
+ Out.InitSections();
}
}
Modified: llvm/trunk/lib/MC/MCPureStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCPureStreamer.cpp?rev=199955&r1=199954&r2=199955&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCPureStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCPureStreamer.cpp Thu Jan 23 17:14:14 2014
@@ -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());
}
Modified: llvm/trunk/lib/MC/WinCOFFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WinCOFFStreamer.cpp?rev=199955&r1=199954&r2=199955&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WinCOFFStreamer.cpp (original)
+++ llvm/trunk/lib/MC/WinCOFFStreamer.cpp Thu Jan 23 17:14:14 2014
@@ -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(MC
// MCStreamer interface
-void WinCOFFStreamer::InitToTextSection() {
- SetSectionText();
-}
-
void WinCOFFStreamer::InitSections() {
SetSectionText();
SetSectionData();
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=199955&r1=199954&r2=199955&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Thu Jan 23 17:14:14 2014
@@ -8851,7 +8851,7 @@ bool ARMAsmParser::parseDirectiveEven(SM
}
if (!Section) {
- getStreamer().InitToTextSection();
+ getStreamer().InitSections();
Section = getStreamer().getCurrentSection().first;
}
More information about the llvm-commits
mailing list