1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Make DWARFUnitSection final and change base class to non-virtual protected destructor.

As per dblaikie suggestion.

llvm-svn: 217871
This commit is contained in:
Frederic Riss 2014-09-16 12:58:01 +00:00
parent 3566191dcd
commit 9922679cc9

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,