From cd12b2c55f8c4731fb828edde8473de56cb40cc4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 16 Jan 2017 18:58:38 -0500 Subject: [PATCH] IR: Make IRBuilder 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. --- Source/Core/Core/PowerPC/JitILCommon/IR.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.h b/Source/Core/Core/PowerPC/JitILCommon/IR.h index fe5e6c46b6..bfe724df59 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.h +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.h @@ -8,6 +8,7 @@ #include #include "Common/CommonTypes.h" +#include "Common/NonCopyable.h" namespace IREmitter { @@ -227,7 +228,7 @@ InstLoc inline getOp2(InstLoc i) return i; } -class IRBuilder +class IRBuilder final : private NonCopyable { public: IRBuilder(); @@ -387,8 +388,6 @@ public: void WriteToFile(u64 codeHash); private: - IRBuilder(IRBuilder&); // DO NOT IMPLEMENT - InstLoc EmitZeroOp(unsigned Opcode, unsigned extra); InstLoc EmitUOp(unsigned OpCode, InstLoc Op1, unsigned extra = 0); InstLoc EmitBiOp(unsigned OpCode, InstLoc Op1, InstLoc Op2, unsigned extra = 0);