[llvm] r199965 - Inline functions that are only called once.

Rafael Espindola rafael.espindola at gmail.com
Thu Jan 23 18:18:40 PST 2014


Author: rafael
Date: Thu Jan 23 20:18:40 2014
New Revision: 199965

URL: http://llvm.org/viewvc/llvm-project?rev=199965&view=rev
Log:
Inline functions that are only called once.

Modified:
    llvm/trunk/include/llvm/MC/MCELFStreamer.h
    llvm/trunk/lib/MC/MCELFStreamer.cpp

Modified: llvm/trunk/include/llvm/MC/MCELFStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCELFStreamer.h?rev=199965&r1=199964&r2=199965&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCELFStreamer.h (original)
+++ llvm/trunk/include/llvm/MC/MCELFStreamer.h Thu Jan 23 20:18:40 2014
@@ -106,10 +106,6 @@ private:
   std::vector<LocalCommon> LocalCommons;
 
   SmallPtrSet<MCSymbol *, 16> BindingExplicitlySet;
-
-  void SetSectionData();
-  void SetSectionText();
-  void SetSectionBss();
 };
 
 MCELFStreamer *createARMELFStreamer(MCContext &Context, MCAsmBackend &TAB,

Modified: llvm/trunk/lib/MC/MCELFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCELFStreamer.cpp?rev=199965&r1=199964&r2=199965&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCELFStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCELFStreamer.cpp Thu Jan 23 20:18:40 2014
@@ -35,31 +35,22 @@
 
 using namespace llvm;
 
-inline void MCELFStreamer::SetSectionData() {
-  SwitchSection(getContext().getObjectFileInfo()->getDataSection());
-  EmitCodeAlignment(4, 0);
+MCELFStreamer::~MCELFStreamer() {
 }
 
-inline void MCELFStreamer::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.
   SwitchSection(getContext().getObjectFileInfo()->getTextSection());
   EmitCodeAlignment(4, 0);
-}
 
-inline void MCELFStreamer::SetSectionBss() {
-  SwitchSection(getContext().getObjectFileInfo()->getBSSSection());
+  SwitchSection(getContext().getObjectFileInfo()->getDataSection());
   EmitCodeAlignment(4, 0);
-}
 
-MCELFStreamer::~MCELFStreamer() {
-}
+  SwitchSection(getContext().getObjectFileInfo()->getBSSSection());
+  EmitCodeAlignment(4, 0);
 
-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.
-  SetSectionText();
-  SetSectionData();
-  SetSectionBss();
-  SetSectionText();
+  SwitchSection(getContext().getObjectFileInfo()->getTextSection());
 }
 
 void MCELFStreamer::EmitLabel(MCSymbol *Symbol) {





More information about the llvm-commits mailing list