cpu: Don't forward declare RefCountingPtr
RefCountingPtr is sometimes forward declared to avoid having to include refcnt.hh. This does not work since we typically return instances of RefCountingPtr rather than references to instances. The only reason this currently works is that we include refcnt.hh in cprintf.hh, which "leaks" the header to most other source files. This changeset replaces such forward declarations with an include of refcnt.hh.
This commit is contained in:
parent
43f1e41c02
commit
25f5a6733c
3 changed files with 6 additions and 3 deletions
|
@ -42,6 +42,8 @@
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
|
#include "base/refcnt.hh"
|
||||||
|
|
||||||
/** uint64_t constant */
|
/** uint64_t constant */
|
||||||
#define ULL(N) ((uint64_t)N##ULL)
|
#define ULL(N) ((uint64_t)N##ULL)
|
||||||
/** int64_t constant */
|
/** int64_t constant */
|
||||||
|
@ -177,7 +179,6 @@ typedef int16_t PortID;
|
||||||
const PortID InvalidPortID = (PortID)-1;
|
const PortID InvalidPortID = (PortID)-1;
|
||||||
|
|
||||||
class FaultBase;
|
class FaultBase;
|
||||||
template <class T> class RefCountingPtr;
|
|
||||||
typedef RefCountingPtr<FaultBase> Fault;
|
typedef RefCountingPtr<FaultBase> Fault;
|
||||||
|
|
||||||
#endif // __BASE_TYPES_HH__
|
#endif // __BASE_TYPES_HH__
|
||||||
|
|
|
@ -31,8 +31,9 @@
|
||||||
#ifndef __CPU_STATIC_INST_FWD_HH__
|
#ifndef __CPU_STATIC_INST_FWD_HH__
|
||||||
#define __CPU_STATIC_INST_FWD_HH__
|
#define __CPU_STATIC_INST_FWD_HH__
|
||||||
|
|
||||||
|
#include "base/refcnt.hh"
|
||||||
|
|
||||||
class StaticInst;
|
class StaticInst;
|
||||||
template <class T> class RefCountingPtr;
|
|
||||||
typedef RefCountingPtr<StaticInst> StaticInstPtr;
|
typedef RefCountingPtr<StaticInst> StaticInstPtr;
|
||||||
|
|
||||||
#endif // __CPU_STATIC_INST_FWD_HH__
|
#endif // __CPU_STATIC_INST_FWD_HH__
|
||||||
|
|
|
@ -31,8 +31,9 @@
|
||||||
#ifndef __SIM_FAULT_FWD_HH__
|
#ifndef __SIM_FAULT_FWD_HH__
|
||||||
#define __SIM_FAULT_FWD_HH__
|
#define __SIM_FAULT_FWD_HH__
|
||||||
|
|
||||||
|
#include "base/refcnt.hh"
|
||||||
|
|
||||||
class FaultBase;
|
class FaultBase;
|
||||||
template <class T> class RefCountingPtr;
|
|
||||||
typedef RefCountingPtr<FaultBase> Fault;
|
typedef RefCountingPtr<FaultBase> Fault;
|
||||||
|
|
||||||
FaultBase * const NoFault = 0;
|
FaultBase * const NoFault = 0;
|
||||||
|
|
Loading…
Reference in a new issue