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.
This commit is contained in:
parent
a8b2dd7fc3
commit
cd12b2c55f
|
@ -8,6 +8,7 @@
|
|||
#include <vector>
|
||||
|
||||
#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);
|
||||
|
|
Loading…
Reference in New Issue