[MC] Clean up unused inline function and non-anchor defaulted destructors; NFCI
Summary:
Take care of some missing clean-ups that belong with r249548 and some
other copy/paste that had happened. In particular, the destructors are
no longer vtable anchors after r249548; and `setSectionName` in
`MCSectionWasm` is private and unused since r313058 culled its only
caller. The destructors are now implicitly defined, and the unused
function is removed.
Reviewers: nemanjai, jasonliu, grosbach
Reviewed By: nemanjai
Subscribers: sbc100, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57182
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353597 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/llvm/MC/MCSectionCOFF.h b/include/llvm/MC/MCSectionCOFF.h
index 68618f1..8be95e0 100644
--- a/include/llvm/MC/MCSectionCOFF.h
+++ b/include/llvm/MC/MCSectionCOFF.h
@@ -62,8 +62,6 @@
}
public:
- ~MCSectionCOFF();
-
/// Decides whether a '.section' directive should be printed before the
/// section name
bool ShouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const;
diff --git a/include/llvm/MC/MCSectionELF.h b/include/llvm/MC/MCSectionELF.h
index f61cd03..fe6b2d7 100644
--- a/include/llvm/MC/MCSectionELF.h
+++ b/include/llvm/MC/MCSectionELF.h
@@ -63,8 +63,6 @@
void setSectionName(StringRef Name) { SectionName = Name; }
public:
- ~MCSectionELF();
-
/// Decides whether a '.section' directive should be printed before the
/// section name
bool ShouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const;
diff --git a/include/llvm/MC/MCSectionWasm.h b/include/llvm/MC/MCSectionWasm.h
index 15f618a..0e576b7 100644
--- a/include/llvm/MC/MCSectionWasm.h
+++ b/include/llvm/MC/MCSectionWasm.h
@@ -48,11 +48,7 @@
: MCSection(SV_Wasm, K, Begin), SectionName(Section), UniqueID(UniqueID),
Group(group) {}
- void setSectionName(StringRef Name) { SectionName = Name; }
-
public:
- ~MCSectionWasm();
-
/// Decides whether a '.section' directive should be printed before the
/// section name
bool shouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const;
diff --git a/lib/MC/MCSectionCOFF.cpp b/lib/MC/MCSectionCOFF.cpp
index 8fd4c64..f0c06f7 100644
--- a/lib/MC/MCSectionCOFF.cpp
+++ b/lib/MC/MCSectionCOFF.cpp
@@ -14,8 +14,6 @@
using namespace llvm;
-MCSectionCOFF::~MCSectionCOFF() = default; // anchor.
-
// ShouldOmitSectionDirective - Decides whether a '.section' directive
// should be printed before the section name
bool MCSectionCOFF::ShouldOmitSectionDirective(StringRef Name,
diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp
index dd88366..e3c24ef 100644
--- a/lib/MC/MCSectionELF.cpp
+++ b/lib/MC/MCSectionELF.cpp
@@ -17,8 +17,6 @@
using namespace llvm;
-MCSectionELF::~MCSectionELF() = default; // anchor.
-
// Decides whether a '.section' directive
// should be printed before the section name.
bool MCSectionELF::ShouldOmitSectionDirective(StringRef Name,
diff --git a/lib/MC/MCSectionWasm.cpp b/lib/MC/MCSectionWasm.cpp
index a8f5689..164ded9 100644
--- a/lib/MC/MCSectionWasm.cpp
+++ b/lib/MC/MCSectionWasm.cpp
@@ -14,8 +14,6 @@
using namespace llvm;
-MCSectionWasm::~MCSectionWasm() = default; // anchor.
-
// Decides whether a '.section' directive
// should be printed before the section name.
bool MCSectionWasm::shouldOmitSectionDirective(StringRef Name,