nv/codegen: Delete copy and assign
Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24904>
This commit is contained in:
@@ -653,6 +653,8 @@ public:
|
|||||||
ValueRef(const ValueRef&);
|
ValueRef(const ValueRef&);
|
||||||
~ValueRef();
|
~ValueRef();
|
||||||
|
|
||||||
|
ValueRef& operator=(const ValueRef&) = delete;
|
||||||
|
|
||||||
inline bool exists() const { return value != NULL; }
|
inline bool exists() const { return value != NULL; }
|
||||||
|
|
||||||
void set(Value *);
|
void set(Value *);
|
||||||
@@ -690,6 +692,8 @@ public:
|
|||||||
ValueDef(const ValueDef&);
|
ValueDef(const ValueDef&);
|
||||||
~ValueDef();
|
~ValueDef();
|
||||||
|
|
||||||
|
ValueDef& operator=(const ValueDef&) = delete;
|
||||||
|
|
||||||
inline bool exists() const { return value != NULL; }
|
inline bool exists() const { return value != NULL; }
|
||||||
|
|
||||||
inline Value *get() const { return value; }
|
inline Value *get() const { return value; }
|
||||||
@@ -719,6 +723,9 @@ public:
|
|||||||
Value();
|
Value();
|
||||||
virtual ~Value() { }
|
virtual ~Value() { }
|
||||||
|
|
||||||
|
Value(const Value&) = delete;
|
||||||
|
Value& operator=(const Value&) = delete;
|
||||||
|
|
||||||
virtual Value *clone(ClonePolicy<Function>&) const = 0;
|
virtual Value *clone(ClonePolicy<Function>&) const = 0;
|
||||||
|
|
||||||
virtual int print(char *, size_t, DataType ty = TYPE_NONE) const = 0;
|
virtual int print(char *, size_t, DataType ty = TYPE_NONE) const = 0;
|
||||||
@@ -855,6 +862,9 @@ public:
|
|||||||
Instruction(Function *, operation, DataType);
|
Instruction(Function *, operation, DataType);
|
||||||
virtual ~Instruction();
|
virtual ~Instruction();
|
||||||
|
|
||||||
|
Instruction(const Instruction&) = delete;
|
||||||
|
Instruction& operator=(const Instruction&) = delete;
|
||||||
|
|
||||||
virtual Instruction *clone(ClonePolicy<Function>&,
|
virtual Instruction *clone(ClonePolicy<Function>&,
|
||||||
Instruction * = NULL) const;
|
Instruction * = NULL) const;
|
||||||
|
|
||||||
@@ -1159,6 +1169,9 @@ public:
|
|||||||
BasicBlock(Function *);
|
BasicBlock(Function *);
|
||||||
~BasicBlock();
|
~BasicBlock();
|
||||||
|
|
||||||
|
BasicBlock(const BasicBlock&) = delete;
|
||||||
|
BasicBlock& operator=(const BasicBlock&) = delete;
|
||||||
|
|
||||||
BasicBlock *clone(ClonePolicy<Function>&) const;
|
BasicBlock *clone(ClonePolicy<Function>&) const;
|
||||||
|
|
||||||
inline int getId() const { return id; }
|
inline int getId() const { return id; }
|
||||||
@@ -1237,6 +1250,9 @@ public:
|
|||||||
Function(Program *, const char *name, uint32_t label);
|
Function(Program *, const char *name, uint32_t label);
|
||||||
~Function();
|
~Function();
|
||||||
|
|
||||||
|
Function(const Function&) = delete;
|
||||||
|
Function& operator=(const Function&) = delete;
|
||||||
|
|
||||||
static inline Function *get(Graph::Node *node);
|
static inline Function *get(Graph::Node *node);
|
||||||
|
|
||||||
inline Program *getProgram() const { return prog; }
|
inline Program *getProgram() const { return prog; }
|
||||||
@@ -1322,6 +1338,9 @@ public:
|
|||||||
Program(Type type, Target *targ);
|
Program(Type type, Target *targ);
|
||||||
~Program();
|
~Program();
|
||||||
|
|
||||||
|
Program(const Program&) = delete;
|
||||||
|
Program& operator=(const Program&) = delete;
|
||||||
|
|
||||||
void print();
|
void print();
|
||||||
|
|
||||||
Type getType() const { return progType; }
|
Type getType() const { return progType; }
|
||||||
|
@@ -160,6 +160,9 @@ public:
|
|||||||
DLList() : head(0) { }
|
DLList() : head(0) { }
|
||||||
~DLList() { clear(); }
|
~DLList() { clear(); }
|
||||||
|
|
||||||
|
DLList(const DLList&) = delete;
|
||||||
|
DLList& operator=(const DLList&) = delete;
|
||||||
|
|
||||||
inline void insertHead(void *data)
|
inline void insertHead(void *data)
|
||||||
{
|
{
|
||||||
Item *item = new Item(data);
|
Item *item = new Item(data);
|
||||||
@@ -248,6 +251,9 @@ public:
|
|||||||
Stack() : size(0), limit(0), array(0) { }
|
Stack() : size(0), limit(0), array(0) { }
|
||||||
~Stack() { if (array) FREE(array); }
|
~Stack() { if (array) FREE(array); }
|
||||||
|
|
||||||
|
Stack(const Stack&) = delete;
|
||||||
|
Stack& operator=(const Stack&) = delete;
|
||||||
|
|
||||||
inline void push(int i) { Item data; data.u.i = i; push(data); }
|
inline void push(int i) { Item data; data.u.i = i; push(data); }
|
||||||
inline void push(unsigned int u) { Item data; data.u.u = u; push(data); }
|
inline void push(unsigned int u) { Item data; data.u.u = u; push(data); }
|
||||||
inline void push(void *p) { Item data; data.u.p = p; push(data); }
|
inline void push(void *p) { Item data; data.u.p = p; push(data); }
|
||||||
@@ -316,6 +322,9 @@ public:
|
|||||||
|
|
||||||
~DynArray() { if (data) FREE(data); }
|
~DynArray() { if (data) FREE(data); }
|
||||||
|
|
||||||
|
DynArray(const DynArray&) = delete;
|
||||||
|
DynArray& operator=(const DynArray&) = delete;
|
||||||
|
|
||||||
inline Item& operator[](unsigned int i)
|
inline Item& operator[](unsigned int i)
|
||||||
{
|
{
|
||||||
if (i >= size)
|
if (i >= size)
|
||||||
@@ -422,6 +431,8 @@ public:
|
|||||||
Interval(const Interval&);
|
Interval(const Interval&);
|
||||||
~Interval();
|
~Interval();
|
||||||
|
|
||||||
|
Interval& operator=(const Interval&) = delete;
|
||||||
|
|
||||||
bool extend(int, int);
|
bool extend(int, int);
|
||||||
void insert(const Interval&);
|
void insert(const Interval&);
|
||||||
void unify(Interval&); // clears source interval
|
void unify(Interval&); // clears source interval
|
||||||
@@ -484,6 +495,8 @@ public:
|
|||||||
FREE(data);
|
FREE(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BitSet(const BitSet&) = delete;
|
||||||
|
|
||||||
// allocate will keep old data iff size is unchanged
|
// allocate will keep old data iff size is unchanged
|
||||||
bool allocate(unsigned int nBits, bool zero);
|
bool allocate(unsigned int nBits, bool zero);
|
||||||
bool resize(unsigned int nBits); // keep old data, zero additional bits
|
bool resize(unsigned int nBits); // keep old data, zero additional bits
|
||||||
@@ -626,6 +639,9 @@ public:
|
|||||||
FREE(allocArray);
|
FREE(allocArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MemoryPool(const MemoryPool&) = delete;
|
||||||
|
MemoryPool& operator=(const MemoryPool&) = delete;
|
||||||
|
|
||||||
void *allocate()
|
void *allocate()
|
||||||
{
|
{
|
||||||
void *ret;
|
void *ret;
|
||||||
|
Reference in New Issue
Block a user