diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index 4968b1ea778..3748ff4e5bc 100644 --- a/include/llvm/ADT/FoldingSet.h +++ b/include/llvm/ADT/FoldingSet.h @@ -126,7 +126,7 @@ protected: explicit FoldingSetBase(unsigned Log2InitSize = 6); FoldingSetBase(FoldingSetBase &&Arg); FoldingSetBase &operator=(FoldingSetBase &&RHS); - ~FoldingSetBase(); + virtual ~FoldingSetBase(); public: //===--------------------------------------------------------------------===// diff --git a/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h b/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h index 961a8d82fe9..38802dbe086 100644 --- a/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h +++ b/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h @@ -46,7 +46,7 @@ public: Entry(Entry &&) = default; Entry &operator=(const Entry &) = default; Entry &operator=(Entry &&) = default; - ~Entry() = default; + virtual ~Entry() = default; public: diff --git a/include/llvm/MC/MCSection.h b/include/llvm/MC/MCSection.h index 14283ead343..bbb0b789858 100644 --- a/include/llvm/MC/MCSection.h +++ b/include/llvm/MC/MCSection.h @@ -104,7 +104,7 @@ protected: SectionKind Kind; MCSection(SectionVariant V, SectionKind K, MCSymbol *Begin); - ~MCSection(); + virtual ~MCSection() = default; public: MCSection(const MCSection &) = delete; diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 0242e35c05b..39172336e5a 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -518,7 +518,7 @@ protected: GenericOptionValue() = default; GenericOptionValue(const GenericOptionValue&) = default; GenericOptionValue &operator=(const GenericOptionValue &) = default; - ~GenericOptionValue() = default; + virtual ~GenericOptionValue() = default; private: virtual void anchor(); diff --git a/include/llvm/Support/YAMLParser.h b/include/llvm/Support/YAMLParser.h index 3570119a3bf..38c151f02a2 100644 --- a/include/llvm/Support/YAMLParser.h +++ b/include/llvm/Support/YAMLParser.h @@ -175,7 +175,7 @@ protected: std::unique_ptr &Doc; SMRange SourceRange; - ~Node() = default; + virtual ~Node() = default; private: unsigned int TypeID; diff --git a/include/llvm/Transforms/Utils/ValueMapper.h b/include/llvm/Transforms/Utils/ValueMapper.h index ff5bfc60958..37238bde552 100644 --- a/include/llvm/Transforms/Utils/ValueMapper.h +++ b/include/llvm/Transforms/Utils/ValueMapper.h @@ -54,7 +54,7 @@ protected: ValueMaterializer() = default; ValueMaterializer(const ValueMaterializer &) = default; ValueMaterializer &operator=(const ValueMaterializer &) = default; - ~ValueMaterializer() = default; + virtual ~ValueMaterializer() = default; public: /// This method can be implemented to generate a mapped Value on demand. For diff --git a/lib/MC/MCSection.cpp b/lib/MC/MCSection.cpp index 074534bd73d..eebfc7d5f31 100644 --- a/lib/MC/MCSection.cpp +++ b/lib/MC/MCSection.cpp @@ -32,8 +32,6 @@ MCSymbol *MCSection::getEndSymbol(MCContext &Ctx) { bool MCSection::hasEnded() const { return End && End->isInSection(); } -MCSection::~MCSection() = default; - void MCSection::setBundleLockState(BundleLockStateType NewState) { if (NewState == NotBundleLocked) { if (BundleLockNestingDepth == 0) {