llvm.org GIT mirror llvm / f630e49
Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164006 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 7 years ago
18 changed file(s) with 59 addition(s) and 48 deletion(s). Raw diff Collapse all Expand all
1414 #ifndef LLVM_ADT_SMALLPTRSET_H
1515 #define LLVM_ADT_SMALLPTRSET_H
1616
17 #include "llvm/Support/Compiler.h"
18 #include "llvm/Support/DataTypes.h"
19 #include "llvm/Support/PointerLikeTypeTraits.h"
1720 #include
1821 #include
1922 #include
2023 #include
21 #include "llvm/Support/DataTypes.h"
22 #include "llvm/Support/PointerLikeTypeTraits.h"
2324
2425 namespace llvm {
2526
131132 /// Grow - Allocate a larger backing store for the buckets and move it over.
132133 void Grow(unsigned NewSize);
133134
134 void operator=(const SmallPtrSetImpl &RHS); // DO NOT IMPLEMENT.
135 void operator=(const SmallPtrSetImpl &RHS) LLVM_DELETED_FUNCTION;
135136 protected:
136137 /// swap - Swaps the elements of two sets.
137138 /// Note: This method assumes that both sets have the same small size.
9393 /// FunctionType - Class to represent function types
9494 ///
9595 class FunctionType : public Type {
96 FunctionType(const FunctionType &); // Do not implement
97 const FunctionType &operator=(const FunctionType &); // Do not implement
96 FunctionType(const FunctionType &) LLVM_DELETED_FUNCTION;
97 const FunctionType &operator=(const FunctionType &) LLVM_DELETED_FUNCTION;
9898 FunctionType(Type *Result, ArrayRef Params, bool IsVarArgs);
9999
100100 public:
186186 /// generator for a target expects).
187187 ///
188188 class StructType : public CompositeType {
189 StructType(const StructType &); // Do not implement
190 const StructType &operator=(const StructType &); // Do not implement
189 StructType(const StructType &) LLVM_DELETED_FUNCTION;
190 const StructType &operator=(const StructType &) LLVM_DELETED_FUNCTION;
191191 StructType(LLVMContext &C)
192192 : CompositeType(C, StructTyID), SymbolTableEntry(0) {}
193193 enum {
307307 ///
308308 class SequentialType : public CompositeType {
309309 Type *ContainedType; ///< Storage for the single contained type.
310 SequentialType(const SequentialType &); // Do not implement!
311 const SequentialType &operator=(const SequentialType &); // Do not implement!
310 SequentialType(const SequentialType &) LLVM_DELETED_FUNCTION;
311 const SequentialType &operator=(const SequentialType &) LLVM_DELETED_FUNCTION;
312312
313313 protected:
314314 SequentialType(TypeID TID, Type *ElType)
335335 class ArrayType : public SequentialType {
336336 uint64_t NumElements;
337337
338 ArrayType(const ArrayType &); // Do not implement
339 const ArrayType &operator=(const ArrayType &); // Do not implement
338 ArrayType(const ArrayType &) LLVM_DELETED_FUNCTION;
339 const ArrayType &operator=(const ArrayType &) LLVM_DELETED_FUNCTION;
340340 ArrayType(Type *ElType, uint64_t NumEl);
341341 public:
342342 /// ArrayType::get - This static method is the primary way to construct an
362362 class VectorType : public SequentialType {
363363 unsigned NumElements;
364364
365 VectorType(const VectorType &); // Do not implement
366 const VectorType &operator=(const VectorType &); // Do not implement
365 VectorType(const VectorType &) LLVM_DELETED_FUNCTION;
366 const VectorType &operator=(const VectorType &) LLVM_DELETED_FUNCTION;
367367 VectorType(Type *ElType, unsigned NumEl);
368368 public:
369369 /// VectorType::get - This static method is the primary way to construct an
428428 /// PointerType - Class to represent pointers.
429429 ///
430430 class PointerType : public SequentialType {
431 PointerType(const PointerType &); // Do not implement
432 const PointerType &operator=(const PointerType &); // Do not implement
431 PointerType(const PointerType &) LLVM_DELETED_FUNCTION;
432 const PointerType &operator=(const PointerType &) LLVM_DELETED_FUNCTION;
433433 explicit PointerType(Type *ElType, unsigned AddrSpace);
434434 public:
435435 /// PointerType::get - This constructs a pointer to an object of the specified
2727 class SymbolTableListTraits;
2828
2929 class Instruction : public User, public ilist_node {
30 void operator=(const Instruction &); // Do not implement
31 Instruction(const Instruction &); // Do not implement
30 void operator=(const Instruction &) LLVM_DELETED_FUNCTION;
31 Instruction(const Instruction &) LLVM_DELETED_FUNCTION;
3232
3333 BasicBlock *Parent;
3434 DebugLoc DbgLoc; // 'dbg' Metadata cache.
8787 /// allocating memory, and never deletes it until the entire block is dead. This
8888 /// makes allocation speedy, but must only be used when the trade-off is ok.
8989 class BumpPtrAllocator {
90 BumpPtrAllocator(const BumpPtrAllocator &); // do not implement
91 void operator=(const BumpPtrAllocator &); // do not implement
90 BumpPtrAllocator(const BumpPtrAllocator &) LLVM_DELETED_FUNCTION;
91 void operator=(const BumpPtrAllocator &) LLVM_DELETED_FUNCTION;
9292
9393 /// SlabSize - Allocate data into slabs of this size unless we get an
9494 /// allocation above SizeThreshold.
4646 Optional > Owner;
4747 Optional Error;
4848
49 LockFileManager(const LockFileManager &);
50 LockFileManager &operator=(const LockFileManager &);
49 LockFileManager(const LockFileManager &) LLVM_DELETED_FUNCTION;
50 LockFileManager &operator=(const LockFileManager &) LLVM_DELETED_FUNCTION;
5151
5252 static Optional >
5353 readLockFile(StringRef LockFileName);
1414 #define LLVM_SUPPORT_MEMORYBUFFER_H
1515
1616 #include "llvm/ADT/StringRef.h"
17 #include "llvm/Support/Compiler.h"
1718 #include "llvm/Support/DataTypes.h"
1819
1920 namespace llvm {
3536 const char *BufferStart; // Start of the buffer.
3637 const char *BufferEnd; // End of the buffer.
3738
38 MemoryBuffer(const MemoryBuffer &); // DO NOT IMPLEMENT
39 MemoryBuffer &operator=(const MemoryBuffer &); // DO NOT IMPLEMENT
39 MemoryBuffer(const MemoryBuffer &) LLVM_DELETED_FUNCTION;
40 MemoryBuffer &operator=(const MemoryBuffer &) LLVM_DELETED_FUNCTION;
4041 protected:
4142 MemoryBuffer() {}
4243 void init(const char *BufStart, const char *BufEnd,
1313 #ifndef LLVM_SYSTEM_MUTEX_H
1414 #define LLVM_SYSTEM_MUTEX_H
1515
16 #include "llvm/Support/Compiler.h"
1617 #include "llvm/Support/Threading.h"
1718 #include
1819
7475 /// @name Do Not Implement
7576 /// @{
7677 private:
77 MutexImpl(const MutexImpl & original);
78 void operator=(const MutexImpl &);
78 MutexImpl(const MutexImpl &) LLVM_DELETED_FUNCTION;
79 void operator=(const MutexImpl &) LLVM_DELETED_FUNCTION;
7980 /// @}
8081 };
8182
1515 #ifndef LLVM_SUPPORT_PRETTYSTACKTRACE_H
1616 #define LLVM_SUPPORT_PRETTYSTACKTRACE_H
1717
18 #include "llvm/Support/Compiler.h"
19
1820 namespace llvm {
1921 class raw_ostream;
2022
3133 /// virtual stack trace. This gets dumped out if the program crashes.
3234 class PrettyStackTraceEntry {
3335 const PrettyStackTraceEntry *NextEntry;
34 PrettyStackTraceEntry(const PrettyStackTraceEntry &); // DO NOT IMPLEMENT
35 void operator=(const PrettyStackTraceEntry&); // DO NOT IMPLEMENT
36 PrettyStackTraceEntry(const PrettyStackTraceEntry &) LLVM_DELETED_FUNCTION;
37 void operator=(const PrettyStackTraceEntry&) LLVM_DELETED_FUNCTION;
3638 public:
3739 PrettyStackTraceEntry();
3840 virtual ~PrettyStackTraceEntry();
3333 void *Data_;
3434
3535 // Noncopyable.
36 Program(const Program& other);
37 Program& operator=(const Program& other);
36 Program(const Program& other) LLVM_DELETED_FUNCTION;
37 Program& operator=(const Program& other) LLVM_DELETED_FUNCTION;
3838
3939 /// @name Methods
4040 /// @{
1313 #ifndef LLVM_SYSTEM_RWMUTEX_H
1414 #define LLVM_SYSTEM_RWMUTEX_H
1515
16 #include "llvm/Support/Compiler.h"
1617 #include "llvm/Support/Threading.h"
1718 #include
1819
7475 /// @name Do Not Implement
7576 /// @{
7677 private:
77 RWMutexImpl(const RWMutexImpl & original);
78 void operator=(const RWMutexImpl &);
78 RWMutexImpl(const RWMutexImpl & original) LLVM_DELETED_FUNCTION;
79 void operator=(const RWMutexImpl &) LLVM_DELETED_FUNCTION;
7980 /// @}
8081 };
8182
6363
6464 DiagHandlerTy DiagHandler;
6565 void *DiagContext;
66
67 SourceMgr(const SourceMgr&); // DO NOT IMPLEMENT
68 void operator=(const SourceMgr&); // DO NOT IMPLEMENT
66
67 SourceMgr(const SourceMgr&) LLVM_DELETED_FUNCTION;
68 void operator=(const SourceMgr&) LLVM_DELETED_FUNCTION;
6969 public:
7070 SourceMgr() : LineNoCache(0), DiagHandler(0), DiagContext(0) {}
7171 ~SourceMgr();
1111 #define STREAMABLEMEMORYOBJECT_H_
1212
1313 #include "llvm/ADT/OwningPtr.h"
14 #include "llvm/Support/Compiler.h"
1415 #include "llvm/Support/MemoryObject.h"
1516 #include "llvm/Support/DataStream.h"
1617 #include
169170 return true;
170171 }
171172
172 StreamingMemoryObject(const StreamingMemoryObject&); // DO NOT IMPLEMENT
173 void operator=(const StreamingMemoryObject&); // DO NOT IMPLEMENT
173 StreamingMemoryObject(const StreamingMemoryObject&) LLVM_DELETED_FUNCTION;
174 void operator=(const StreamingMemoryObject&) LLVM_DELETED_FUNCTION;
174175 };
175176
176177 StreamableMemoryObject *getNonStreamedMemoryObject(
1414 #ifndef LLVM_SUPPORT_TIMER_H
1515 #define LLVM_SUPPORT_TIMER_H
1616
17 #include "llvm/Support/Compiler.h"
1718 #include "llvm/Support/DataTypes.h"
1819 #include "llvm/ADT/StringRef.h"
1920 #include
129130 ///
130131 class TimeRegion {
131132 Timer *T;
132 TimeRegion(const TimeRegion &); // DO NOT IMPLEMENT
133 TimeRegion(const TimeRegion &) LLVM_DELETED_FUNCTION;
133134 public:
134135 explicit TimeRegion(Timer &t) : T(&t) {
135136 T->startTimer();
167168 std::vector > TimersToPrint;
168169
169170 TimerGroup **Prev, *Next; // Doubly linked list of TimerGroup's.
170 TimerGroup(const TimerGroup &TG); // DO NOT IMPLEMENT
171 void operator=(const TimerGroup &TG); // DO NOT IMPLEMENT
171 TimerGroup(const TimerGroup &TG) LLVM_DELETED_FUNCTION;
172 void operator=(const TimerGroup &TG) LLVM_DELETED_FUNCTION;
172173 public:
173174 explicit TimerGroup(StringRef name);
174175 ~TimerGroup();
1414 #define LLVM_SUPPORT_RAW_OSTREAM_H
1515
1616 #include "llvm/ADT/StringRef.h"
17 #include "llvm/Support/Compiler.h"
1718 #include "llvm/Support/DataTypes.h"
1819
1920 namespace llvm {
2829 class raw_ostream {
2930 private:
3031 // Do not implement. raw_ostream is noncopyable.
31 void operator=(const raw_ostream &);
32 raw_ostream(const raw_ostream &);
32 void operator=(const raw_ostream &) LLVM_DELETED_FUNCTION;
33 raw_ostream(const raw_ostream &) LLVM_DELETED_FUNCTION;
3334
3435 /// The buffer is handled in such a way that the buffer is
3536 /// uninitialized, unbuffered, or out of space when OutBufCur >=
1515
1616 #ifndef LLVM_SYSTEM_SYSTEM_ERROR_H
1717 #define LLVM_SYSTEM_SYSTEM_ERROR_H
18
19 #include "llvm/Support/Compiler.h"
1820
1921 /*
2022 system_error synopsis
628630
629631 private:
630632 error_category();
631 error_category(const error_category&);// = delete;
632 error_category& operator=(const error_category&);// = delete;
633 error_category(const error_category&) LLVM_DELETED_FUNCTION;
634 error_category& operator=(const error_category&) LLVM_DELETED_FUNCTION;
633635
634636 public:
635637 virtual const char* name() const = 0;
6565
6666 private:
6767 /// Copy ctor - do not implement
68 Use(const Use &U);
68 Use(const Use &U) LLVM_DELETED_FUNCTION;
6969
7070 /// Destructor - Only for zap()
7171 ~Use() {
3030 struct OperandTraits;
3131
3232 class User : public Value {
33 User(const User &); // Do not implement
34 void *operator new(size_t); // Do not implement
33 User(const User &) LLVM_DELETED_FUNCTION;
34 void *operator new(size_t) LLVM_DELETED_FUNCTION;
3535 template
3636 friend struct HungoffOperandTraits;
3737 virtual void anchor();
7979 friend class ValueHandleBase;
8080 ValueName *Name;
8181
82 void operator=(const Value &); // Do not implement
83 Value(const Value &); // Do not implement
82 void operator=(const Value &) LLVM_DELETED_FUNCTION;
83 Value(const Value &) LLVM_DELETED_FUNCTION;
8484
8585 protected:
8686 /// printCustom - Value subclasses can override this to implement custom