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.
This commit is contained in:
Lioncash 2017-01-16 15:43:22 -05:00
parent 1a01aee66e
commit 45f7883ed8
1 changed files with 2 additions and 4 deletions

View File

@ -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)