InitToTextSection is redundant with InitSections. Remove it.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 23 Jan 2014 23:14:14 +0000 (23:14 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 23 Jan 2014 23:14:14 +0000 (23:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199955 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCELFStreamer.h
include/llvm/MC/MCStreamer.h
lib/LTO/LTOModule.cpp
lib/MC/MCAsmStreamer.cpp
lib/MC/MCELFStreamer.cpp
lib/MC/MCMachOStreamer.cpp
lib/MC/MCNullStreamer.cpp
lib/MC/MCParser/AsmParser.cpp
lib/MC/MCPureStreamer.cpp
lib/MC/WinCOFFStreamer.cpp
lib/Target/ARM/AsmParser/ARMAsmParser.cpp

index 72b7075c6fc64e0b5be2a6b0b056af4cb8c0e464..c9ec720b9be8dfbc3e1e3e3b9447be045897e8f6 100644 (file)
@@ -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);
index 62e5d6bcd040e6b22b5753918ba72eddd29624de..870cc874b088dd6aad0e625bdd9adeb942bdeee0 100644 (file)
@@ -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,
index b648982af1dd3793600e8f1c68cf2f35834e9bd6..4fa21ae81852b9797c6d4df7991b8b2afce5ecc1 100644 (file)
@@ -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) {}
index 64bcb83b225bc0664ea99a4b47f5f40956659527..1a82fdebd0bcf332c727f13935903fec4ffe0495 100644 (file)
@@ -129,10 +129,6 @@ public:
                              const MCExpr *Subsection);
 
   virtual void InitSections() {
-    InitToTextSection();
-  }
-
-  virtual void InitToTextSection() {
     SwitchSection(getContext().getObjectFileInfo()->getTextSection());
   }
 
index 5fbbdd4b3e936c8d0d7a8a79dd6066b2dce9fb79..47ac181346ddfbf48d6b9eeffc7d360f08098054 100644 (file)
@@ -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.
index 6fe466376671d04ca97f1102bd18cf71c140f99a..1386b1ae4b2a36e80d424c27908c3b8a48860d33 100644 (file)
@@ -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());
 }
 
index 9b9c4aa2a0cdfc306839804ac2326416b235210a..9d98f987d69fc1cea1a4a387d811b91058b79b9a 100644 (file)
@@ -24,9 +24,6 @@ namespace {
     /// @name MCStreamer Interface
     /// @{
 
-    virtual void InitToTextSection() {
-    }
-
     virtual void InitSections() {
     }
 
index a2acd8391b393ceb8844db8ae9fb037e076d1ab5..035ecaacc8cf0efd733899e373b77839a4716ab9 100644 (file)
@@ -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();
   }
 }
 
index f7bf002fbc679b3250fe1eb41a6254c46378e44a..8bb7a7bd40e2284d96f0d2d0b8f84812b04834f5 100644 (file)
@@ -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());
 }
 
index b7d55741456a20e73394b47bb58e5c374fe33c71..2e090a045e96cf7f9348375357c724028c57547d 100644 (file)
@@ -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();
index 216f4aa2d6423f59803ff0d144bfc23dff93fb3a..06f2b4ef2efcbc89d8aee39638b7209c126020ad 100644 (file)
@@ -8851,7 +8851,7 @@ bool ARMAsmParser::parseDirectiveEven(SMLoc L) {
   }
 
   if (!Section) {
-    getStreamer().InitToTextSection();
+    getStreamer().InitSections();
     Section = getStreamer().getCurrentSection().first;
   }