Fixed compiler error caused by private destructor (#1199)
Changed virtual private base class to a virtual public base class to work around a clang compilation failure. Also marked other classes final to work around virtual-related compiler warnings.
This commit is contained in:
parent
71ccb4c9a7
commit
cb755ee969
|
@ -41,12 +41,10 @@ constexpr int RANGE_COUNT_SIZE = 48;
|
|||
constexpr uint32_t BIN_H_MASK = (1L << (BIN_SIZE - 32)) - 1;
|
||||
constexpr uint32_t RANGE_H_MASK = (1L << (RANGE_COUNT_SIZE - 32)) - 1;
|
||||
|
||||
class AddrRangeCounter : public FpgaModel {
|
||||
class AddrRangeCounter final : public FpgaModel {
|
||||
public:
|
||||
AddrRangeCounter(simif_t *sim, AddressMap addr_map, std::string name)
|
||||
: FpgaModel(sim, addr_map), name(name){};
|
||||
~AddrRangeCounter(void) { /*delete [] range_bytes;*/
|
||||
}
|
||||
|
||||
void init();
|
||||
void profile() {}
|
||||
|
@ -63,10 +61,11 @@ private:
|
|||
std::string addr = name + "Ranges_addr";
|
||||
};
|
||||
|
||||
class Histogram : public FpgaModel {
|
||||
class Histogram final : public FpgaModel {
|
||||
public:
|
||||
Histogram(simif_t *s, AddressMap addr_map, std::string name)
|
||||
: FpgaModel(s, addr_map), name(name){};
|
||||
|
||||
void init();
|
||||
void profile(){};
|
||||
void finish();
|
||||
|
|
|
@ -25,6 +25,8 @@ private:
|
|||
|
||||
public:
|
||||
FpgaModel(simif_t *s, AddressMap addr_map) : sim(s), addr_map(addr_map){};
|
||||
virtual ~FpgaModel() {}
|
||||
|
||||
virtual void init() = 0;
|
||||
virtual void profile() = 0;
|
||||
virtual void finish() = 0;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "bridges/synthesized_prints.h"
|
||||
|
||||
class fasedtests_top_t : virtual simif_peek_poke_t,
|
||||
class fasedtests_top_t : virtual public simif_peek_poke_t,
|
||||
public systematic_scheduler_t {
|
||||
public:
|
||||
fasedtests_top_t(int argc, char **argv);
|
||||
|
|
Loading…
Reference in New Issue