From 8e4f570760b035c44d1f5b52cc9b2ccd022b711d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 3 Oct 2015 18:28:40 +0000 Subject: [PATCH] Move registerSection out of line and reduce #includes. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249241 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/MC/MCAssembler.h | 9 +-------- lib/MC/MCAssembler.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 1a1008c8928..43977a35985 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -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); diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index 79854596bc6..d93bf44928d 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -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; -- 2.34.1