Skip to content

Commit

Permalink
[MC] Clean up unused inline function and non-anchor defaulted destruc…
Browse files Browse the repository at this point in the history
…tors; 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

llvm-svn: 353597
  • Loading branch information
hubert-reinterpretcast committed Feb 9, 2019
1 parent 6218b8e commit 8c2a236
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 14 deletions.
2 changes: 0 additions & 2 deletions llvm/include/llvm/MC/MCSectionCOFF.h
Expand Up @@ -62,8 +62,6 @@ class MCSectionCOFF final : public MCSection {
}

public:
~MCSectionCOFF();

/// Decides whether a '.section' directive should be printed before the
/// section name
bool ShouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const;
Expand Down
2 changes: 0 additions & 2 deletions llvm/include/llvm/MC/MCSectionELF.h
Expand Up @@ -63,8 +63,6 @@ class MCSectionELF final : public MCSection {
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;
Expand Down
4 changes: 0 additions & 4 deletions llvm/include/llvm/MC/MCSectionWasm.h
Expand Up @@ -48,11 +48,7 @@ class MCSectionWasm final : public MCSection {
: 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;
Expand Down
2 changes: 0 additions & 2 deletions llvm/lib/MC/MCSectionCOFF.cpp
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions llvm/lib/MC/MCSectionELF.cpp
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions llvm/lib/MC/MCSectionWasm.cpp
Expand Up @@ -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,
Expand Down

0 comments on commit 8c2a236

Please sign in to comment.