From 359528b8054b542a1db07690fb1bc354a5430f97 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 23 Feb 2017 13:50:45 -0500 Subject: [PATCH] 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). --- Source/Core/Core/PowerPC/JitCommon/JitBase.cpp | 4 ++++ Source/Core/Core/PowerPC/JitCommon/JitBase.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp b/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp index 634331c15a..455acf5cfe 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp @@ -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) diff --git a/Source/Core/Core/PowerPC/JitCommon/JitBase.h b/Source/Core/Core/PowerPC/JitCommon/JitBase.h index 6a154922ff..c3c63dad41 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitBase.h +++ b/Source/Core/Core/PowerPC/JitCommon/JitBase.h @@ -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;