[llvm] r353597 - [MC] Clean up unused inline function and non-anchor defaulted destructors; NFCI
Hubert Tong via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 8 18:11:51 PST 2019
Author: hubert.reinterpretcast
Date: Fri Feb 8 18:11:51 2019
New Revision: 353597
URL: http://llvm.org/viewvc/llvm-project?rev=353597&view=rev
Log:
[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
Modified:
llvm/trunk/include/llvm/MC/MCSectionCOFF.h
llvm/trunk/include/llvm/MC/MCSectionELF.h
llvm/trunk/include/llvm/MC/MCSectionWasm.h
llvm/trunk/lib/MC/MCSectionCOFF.cpp
llvm/trunk/lib/MC/MCSectionELF.cpp
llvm/trunk/lib/MC/MCSectionWasm.cpp
Modified: llvm/trunk/include/llvm/MC/MCSectionCOFF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSectionCOFF.h?rev=353597&r1=353596&r2=353597&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCSectionCOFF.h (original)
+++ llvm/trunk/include/llvm/MC/MCSectionCOFF.h Fri Feb 8 18:11:51 2019
@@ -62,8 +62,6 @@ private:
}
public:
- ~MCSectionCOFF();
-
/// Decides whether a '.section' directive should be printed before the
/// section name
bool ShouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const;
Modified: llvm/trunk/include/llvm/MC/MCSectionELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSectionELF.h?rev=353597&r1=353596&r2=353597&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCSectionELF.h (original)
+++ llvm/trunk/include/llvm/MC/MCSectionELF.h Fri Feb 8 18:11:51 2019
@@ -63,8 +63,6 @@ private:
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;
Modified: llvm/trunk/include/llvm/MC/MCSectionWasm.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSectionWasm.h?rev=353597&r1=353596&r2=353597&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCSectionWasm.h (original)
+++ llvm/trunk/include/llvm/MC/MCSectionWasm.h Fri Feb 8 18:11:51 2019
@@ -48,11 +48,7 @@ class MCSectionWasm final : public MCSec
: 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;
Modified: llvm/trunk/lib/MC/MCSectionCOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSectionCOFF.cpp?rev=353597&r1=353596&r2=353597&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCSectionCOFF.cpp (original)
+++ llvm/trunk/lib/MC/MCSectionCOFF.cpp Fri Feb 8 18:11:51 2019
@@ -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,
Modified: llvm/trunk/lib/MC/MCSectionELF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSectionELF.cpp?rev=353597&r1=353596&r2=353597&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCSectionELF.cpp (original)
+++ llvm/trunk/lib/MC/MCSectionELF.cpp Fri Feb 8 18:11:51 2019
@@ -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,
Modified: llvm/trunk/lib/MC/MCSectionWasm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSectionWasm.cpp?rev=353597&r1=353596&r2=353597&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCSectionWasm.cpp (original)
+++ llvm/trunk/lib/MC/MCSectionWasm.cpp Fri Feb 8 18:11:51 2019
@@ -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,
More information about the llvm-commits
mailing list