aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCSection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCSection.cpp')
-rw-r--r--lib/MC/MCSection.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/MC/MCSection.cpp b/lib/MC/MCSection.cpp
index 9064cdf2f319..7986c0122043 100644
--- a/lib/MC/MCSection.cpp
+++ b/lib/MC/MCSection.cpp
@@ -7,17 +7,18 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/MC/MCSection.h"
-#include "llvm/MC/MCAssembler.h"
-#include "llvm/MC/MCAsmInfo.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCContext.h"
+#include "llvm/MC/MCFragment.h"
+#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCSymbol.h"
+#include "llvm/Support/Compiler.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
-using namespace llvm;
+#include <algorithm>
+#include <utility>
-//===----------------------------------------------------------------------===//
-// MCSection
-//===----------------------------------------------------------------------===//
+using namespace llvm;
MCSection::MCSection(SectionVariant V, SectionKind K, MCSymbol *Begin)
: Begin(Begin), BundleGroupBeforeFirstInst(false), HasInstructions(false),
@@ -31,8 +32,7 @@ MCSymbol *MCSection::getEndSymbol(MCContext &Ctx) {
bool MCSection::hasEnded() const { return End && End->isInSection(); }
-MCSection::~MCSection() {
-}
+MCSection::~MCSection() = default;
void MCSection::setBundleLockState(BundleLockStateType NewState) {
if (NewState == NotBundleLocked) {
@@ -85,8 +85,9 @@ MCSection::getSubsectionInsertionPoint(unsigned Subsection) {
return IP;
}
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void MCSection::dump() {
- raw_ostream &OS = llvm::errs();
+ raw_ostream &OS = errs();
OS << "<MCSection";
OS << " Fragments:[\n ";
@@ -97,3 +98,4 @@ LLVM_DUMP_METHOD void MCSection::dump() {
}
OS << "]>";
}
+#endif