Move registerSection out of line and reduce #includes. NFC.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 3 Oct 2015 18:28:40 +0000 (18:28 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 3 Oct 2015 18:28:40 +0000 (18:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249241 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCAssembler.h
lib/MC/MCAssembler.cpp

index 1a1008c8928fadcd5e3e48f8f3d0652fa2a82d66..43977a35985c2d7ed5d866601cc9c752d93b13a1 100644 (file)
@@ -22,7 +22,6 @@
 #include "llvm/MC/MCFixup.h"
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCLinkerOptimizationHint.h"
-#include "llvm/MC/MCSection.h"
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/DataTypes.h"
@@ -860,13 +859,7 @@ public:
   /// \name Backend Data Access
   /// @{
 
-  bool registerSection(MCSection &Section) {
-    if (Section.isRegistered())
-      return false;
-    Sections.push_back(&Section);
-    Section.setIsRegistered(true);
-    return true;
-  }
+  bool registerSection(MCSection &Section);
 
   void registerSymbol(const MCSymbol &Symbol, bool *Created = nullptr);
 
index 79854596bc63fb2c73e406be3370e87785ca588a..d93bf44928ddc2057f80129a1b7dd34d3a127ebf 100644 (file)
@@ -357,6 +357,14 @@ void MCAssembler::reset() {
   getLOHContainer().reset();
 }
 
+bool MCAssembler::registerSection(MCSection &Section) {
+  if (Section.isRegistered())
+    return false;
+  Sections.push_back(&Section);
+  Section.setIsRegistered(true);
+  return true;
+}
+
 bool MCAssembler::isThumbFunc(const MCSymbol *Symbol) const {
   if (ThumbFuncs.count(Symbol))
     return true;