aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCSectionELF.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2017-02-14 00:33:36 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2017-02-14 00:33:36 +0000
commitd96089b2487448af11ecdaba8371f08d9b2381a2 (patch)
treef5cd5c76dc0d6cf713605a5baaec1d0cd2edd96b /llvm/lib/MC/MCSectionELF.cpp
parentc45f7f3eb424a64a1eb42c867d0837adb218f57b (diff)
downloadllvm-d96089b2487448af11ecdaba8371f08d9b2381a2.zip
llvm-d96089b2487448af11ecdaba8371f08d9b2381a2.tar.gz
llvm-d96089b2487448af11ecdaba8371f08d9b2381a2.tar.bz2
[MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
Same changes in files affected by reduced MC headers dependencies. llvm-svn: 295009
Diffstat (limited to 'llvm/lib/MC/MCSectionELF.cpp')
-rw-r--r--llvm/lib/MC/MCSectionELF.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp
index 422652e..fdd9239 100644
--- a/llvm/lib/MC/MCSectionELF.cpp
+++ b/llvm/lib/MC/MCSectionELF.cpp
@@ -7,23 +7,22 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/MC/MCSectionELF.h"
+#include "llvm/ADT/Triple.h"
#include "llvm/MC/MCAsmInfo.h"
-#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
-#include "llvm/MC/MCSymbol.h"
+#include "llvm/MC/MCSectionELF.h"
#include "llvm/Support/ELF.h"
#include "llvm/Support/raw_ostream.h"
+#include <cassert>
using namespace llvm;
-MCSectionELF::~MCSectionELF() {} // anchor.
+MCSectionELF::~MCSectionELF() = default; // anchor.
// Decides whether a '.section' directive
// should be printed before the section name.
bool MCSectionELF::ShouldOmitSectionDirective(StringRef Name,
const MCAsmInfo &MAI) const {
-
if (isUnique())
return false;
@@ -56,7 +55,6 @@ static void printName(raw_ostream &OS, StringRef Name) {
void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
raw_ostream &OS,
const MCExpr *Subsection) const {
-
if (ShouldOmitSectionDirective(SectionName, MAI)) {
OS << '\t' << getSectionName();
if (Subsection) {