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
This commit is contained in:
Frederic Riss 2014-09-16 12:58:01 +00:00
parent e40de571ad
commit baaa29f3a2

View File

@ -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<typename UnitType>
class DWARFUnitSection : public SmallVector<std::unique_ptr<UnitType>, 1>,
public DWARFUnitSectionBase {
class DWARFUnitSection final : public SmallVector<std::unique_ptr<UnitType>, 1>,
public DWARFUnitSectionBase {
struct UnitOffsetComparator {
bool operator()(const std::unique_ptr<UnitType> &LHS,