From 45f7883ed87ebd5cc4752b91e8f15267513edb22 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 16 Jan 2017 15:43:22 -0500 Subject: [PATCH] IR_X86: Make RegInfo uncopyable Hiding and not implementing the copy constructor is a pre-C++11 thing. It should also be noted that a copy constructor, as defined by the language, contains a const qualifier on its parameter, so this wouldn't have prevented copies from being performed. It also follows that if the copy constructor is deleted, then copy assignment should also be forbidden. --- Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp b/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp index 83eb202eb2..0f95449d9d 100644 --- a/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp +++ b/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp @@ -33,6 +33,7 @@ The register allocation is linear scan allocation. #include "Common/CommonTypes.h" #include "Common/MathUtil.h" #include "Common/MsgHandler.h" +#include "Common/NonCopyable.h" #include "Common/x64ABI.h" #include "Common/x64Emitter.h" #include "Core/CoreTiming.h" @@ -48,7 +49,7 @@ using namespace Gen; static const unsigned int MAX_NUMBER_OF_REGS = 16; -struct RegInfo +struct RegInfo final : private NonCopyable { JitIL* Jit; IRBuilder* Build; @@ -79,9 +80,6 @@ struct RegInfo numSpills(0), numFSpills(0), exitNumber(0) { } - -private: - RegInfo(RegInfo&); // DO NOT IMPLEMENT }; static BitSet32 regsInUse(RegInfo& R)