llvm.org GIT mirror llvm / 9f9ce61
Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164017 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 7 years ago
16 changed file(s) with 39 addition(s) and 37 deletion(s). Raw diff Collapse all Expand all
7878 void setParent(Function *parent);
7979 friend class SymbolTableListTraits;
8080
81 BasicBlock(const BasicBlock &); // Do not implement
82 void operator=(const BasicBlock &); // Do not implement
81 BasicBlock(const BasicBlock &) LLVM_DELETED_FUNCTION;
82 void operator=(const BasicBlock &) LLVM_DELETED_FUNCTION;
8383
8484 /// BasicBlock ctor - If the function parameter is specified, the basic block
8585 /// is automatically inserted at either the end of the function (if
4646 /// block/record name information in the BlockInfo block. Only llvm-bcanalyzer
4747 /// uses this.
4848 bool IgnoreBlockInfoNames;
49
50 BitstreamReader(const BitstreamReader&); // DO NOT IMPLEMENT
51 void operator=(const BitstreamReader&); // DO NOT IMPLEMENT
49
50 BitstreamReader(const BitstreamReader&) LLVM_DELETED_FUNCTION;
51 void operator=(const BitstreamReader&) LLVM_DELETED_FUNCTION;
5252 public:
5353 BitstreamReader() : IgnoreBlockInfoNames(true) {
5454 }
3838 /// don't have to worry about the lifetime of the objects.
3939 /// @brief LLVM Constant Representation
4040 class Constant : public User {
41 void operator=(const Constant &); // Do not implement
42 Constant(const Constant &); // Do not implement
41 void operator=(const Constant &) LLVM_DELETED_FUNCTION;
42 Constant(const Constant &) LLVM_DELETED_FUNCTION;
4343 virtual void anchor();
4444
4545 protected:
6262 SmallVector AllSubprograms;
6363 SmallVector AllGVs;
6464
65 DIBuilder(const DIBuilder &); // DO NOT IMPLEMENT
66 void operator=(const DIBuilder &); // DO NOT IMPLEMENT
65 DIBuilder(const DIBuilder &) LLVM_DELETED_FUNCTION;
66 void operator=(const DIBuilder &) LLVM_DELETED_FUNCTION;
6767
6868 public:
6969 explicit DIBuilder(Module &M);
108108 BuildLazyArguments();
109109 }
110110 void BuildLazyArguments() const;
111
112 Function(const Function&); // DO NOT IMPLEMENT
113 void operator=(const Function&); // DO NOT IMPLEMENT
111
112 Function(const Function&) LLVM_DELETED_FUNCTION;
113 void operator=(const Function&) LLVM_DELETED_FUNCTION;
114114
115115 /// Function ctor - If the (optional) Module argument is specified, the
116116 /// function is automatically inserted into the end of the function list for
2727
2828 class GlobalAlias : public GlobalValue, public ilist_node {
2929 friend class SymbolTableListTraits;
30 void operator=(const GlobalAlias &); // Do not implement
31 GlobalAlias(const GlobalAlias &); // Do not implement
30 void operator=(const GlobalAlias &) LLVM_DELETED_FUNCTION;
31 GlobalAlias(const GlobalAlias &) LLVM_DELETED_FUNCTION;
3232
3333 void setParent(Module *parent);
3434
2525 class Module;
2626
2727 class GlobalValue : public Constant {
28 GlobalValue(const GlobalValue &); // do not implement
28 GlobalValue(const GlobalValue &) LLVM_DELETED_FUNCTION;
2929 public:
3030 /// @brief An enumeration for the kinds of linkage for global values.
3131 enum LinkageTypes {
4343 friend class ConstantUniqueMap
4444 PointerType, InlineAsm, false>;
4545
46 InlineAsm(const InlineAsm &); // do not implement
47 void operator=(const InlineAsm&); // do not implement
46 InlineAsm(const InlineAsm &) LLVM_DELETED_FUNCTION;
47 void operator=(const InlineAsm&) LLVM_DELETED_FUNCTION;
4848
4949 std::string AsmString, Constraints;
5050 bool HasSideEffects;
3333 /// functions. This allows the standard isa/dyncast/cast functionality to
3434 /// work with calls to intrinsic functions.
3535 class IntrinsicInst : public CallInst {
36 IntrinsicInst(); // DO NOT IMPLEMENT
37 IntrinsicInst(const IntrinsicInst&); // DO NOT IMPLEMENT
38 void operator=(const IntrinsicInst&); // DO NOT IMPLEMENT
36 IntrinsicInst() LLVM_DELETED_FUNCTION;
37 IntrinsicInst(const IntrinsicInst&) LLVM_DELETED_FUNCTION;
38 void operator=(const IntrinsicInst&) LLVM_DELETED_FUNCTION;
3939 public:
4040 /// getIntrinsicID - Return the intrinsic ID of this intrinsic.
4141 ///
1313
1414 #ifndef LLVM_LLVMCONTEXT_H
1515 #define LLVM_LLVMCONTEXT_H
16
17 #include "llvm/Support/Compiler.h"
1618
1719 namespace llvm {
1820
8789 void emitError(const Twine &ErrorStr);
8890
8991 private:
90 // DO NOT IMPLEMENT
91 LLVMContext(LLVMContext&);
92 void operator=(LLVMContext&);
92 LLVMContext(LLVMContext&) LLVM_DELETED_FUNCTION;
93 void operator=(LLVMContext&) LLVM_DELETED_FUNCTION;
9394
9495 /// addModule - Register a module as being instantiated in this context. If
9596 /// the context is deleted, the module will be deleted as well.
3636 /// MDString is always unnamed.
3737 class MDString : public Value {
3838 virtual void anchor();
39 MDString(const MDString &); // DO NOT IMPLEMENT
39 MDString(const MDString &) LLVM_DELETED_FUNCTION;
4040
4141 explicit MDString(LLVMContext &C);
4242 public:
7070 //===----------------------------------------------------------------------===//
7171 /// MDNode - a tuple of other values.
7272 class MDNode : public Value, public FoldingSetNode {
73 MDNode(const MDNode &); // DO NOT IMPLEMENT
74 void operator=(const MDNode &); // DO NOT IMPLEMENT
73 MDNode(const MDNode &) LLVM_DELETED_FUNCTION;
74 void operator=(const MDNode &) LLVM_DELETED_FUNCTION;
7575 friend class MDNodeOperand;
7676 friend class LLVMContextImpl;
7777 friend struct FoldingSetTrait;
194194 friend struct ilist_traits;
195195 friend class LLVMContextImpl;
196196 friend class Module;
197 NamedMDNode(const NamedMDNode &); // DO NOT IMPLEMENT
197 NamedMDNode(const NamedMDNode &) LLVM_DELETED_FUNCTION;
198198
199199 std::string Name;
200200 Module *Parent;
2525
2626 class Binary {
2727 private:
28 Binary(); // = delete
29 Binary(const Binary &other); // = delete
28 Binary() LLVM_DELETED_FUNCTION;
29 Binary(const Binary &other) LLVM_DELETED_FUNCTION;
3030
3131 unsigned int TypeID;
3232
265265 /// figure out which type to create.
266266 class ObjectFile : public Binary {
267267 virtual void anchor();
268 ObjectFile(); // = delete
269 ObjectFile(const ObjectFile &other); // = delete
268 ObjectFile() LLVM_DELETED_FUNCTION;
269 ObjectFile(const ObjectFile &other) LLVM_DELETED_FUNCTION;
270270
271271 protected:
272272 ObjectFile(unsigned int Type, MemoryBuffer *source, error_code &ec);
2828 #ifndef LLVM_PASS_H
2929 #define LLVM_PASS_H
3030
31 #include "llvm/Support/Compiler.h"
3132 #include
3233
3334 namespace llvm {
8182 AnalysisResolver *Resolver; // Used to resolve analysis
8283 const void *PassID;
8384 PassKind Kind;
84 void operator=(const Pass&); // DO NOT IMPLEMENT
85 Pass(const Pass &); // DO NOT IMPLEMENT
85 void operator=(const Pass&) LLVM_DELETED_FUNCTION;
86 Pass(const Pass &) LLVM_DELETED_FUNCTION;
8687
8788 public:
8889 explicit Pass(PassKind K, char &pid) : Resolver(0), PassID(&pid), Kind(K) { }
125125 }
126126
127127 private:
128 void operator=(const PassInfo &); // do not implement
129 PassInfo(const PassInfo &); // do not implement
128 void operator=(const PassInfo &) LLVM_DELETED_FUNCTION;
129 PassInfo(const PassInfo &) LLVM_DELETED_FUNCTION;
130130 };
131131
132132 #define CALL_ONCE_INITIALIZATION(function) \
108108 private:
109109 Value *GetValueAtEndOfBlockInternal(BasicBlock *BB);
110110
111 void operator=(const SSAUpdater&); // DO NOT IMPLEMENT
112 SSAUpdater(const SSAUpdater&); // DO NOT IMPLEMENT
111 void operator=(const SSAUpdater&) LLVM_DELETED_FUNCTION;
112 SSAUpdater(const SSAUpdater&) LLVM_DELETED_FUNCTION;
113113 };
114114
115115 /// LoadAndStorePromoter - This little helper class provides a convenient way to