JitBase: Put constructor and destructor in the cpp file

As this is a base class with virtuals, there needs to be an out-of-line
function definition to prevent the vtable of the class being placed within
every translation unit it's used in (i.e. every JIT implementation).
This commit is contained in:
Lioncash 2017-02-23 13:50:45 -05:00
parent f7a09c41a1
commit 359528b805
2 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,10 @@ u32 Helper_Mask(u8 mb, u8 me)
return mb > me ? ~mask : mask;
}
JitBase::JitBase() = default;
JitBase::~JitBase() = default;
bool JitBase::MergeAllowedNextInstructions(int count)
{
if (CPU::GetState() == CPU::CPU_STEPPING || js.instructionsLeft < count)

View File

@ -114,6 +114,9 @@ public:
JitOptions jo;
JitState js;
JitBase();
~JitBase() override;
static const u8* Dispatch() { return g_jit->GetBlockCache()->Dispatch(); };
virtual JitBaseBlockCache* GetBlockCache() = 0;