From baaa29f3a2b5b4463921fe3af7669850e7de81fd Mon Sep 17 00:00:00 2001 From: Frederic Riss Date: Tue, 16 Sep 2014 12:58:01 +0000 Subject: [PATCH] Make DWARFUnitSection final and change base class to non-virtual protected destructor. As per dblaikie suggestion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217871 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/DebugInfo/DWARFUnit.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/DebugInfo/DWARFUnit.h b/lib/DebugInfo/DWARFUnit.h index ca105be00d6..e8205be13f4 100644 --- a/lib/DebugInfo/DWARFUnit.h +++ b/lib/DebugInfo/DWARFUnit.h @@ -36,13 +36,14 @@ public: /// same section this Unit originated from. virtual DWARFUnit *getUnitForOffset(uint32_t Offset) const = 0; - virtual ~DWARFUnitSectionBase() {} +protected: + ~DWARFUnitSectionBase() {} }; /// Concrete instance of DWARFUnitSection, specialized for one Unit type. template -class DWARFUnitSection : public SmallVector, 1>, - public DWARFUnitSectionBase { +class DWARFUnitSection final : public SmallVector, 1>, + public DWARFUnitSectionBase { struct UnitOffsetComparator { bool operator()(const std::unique_ptr &LHS,