Make use of the LLVM_DELETED_FUNCTION macro.
authorCraig Topper <craig.topper@gmail.com>
Wed, 29 Aug 2012 06:28:46 +0000 (06:28 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 29 Aug 2012 06:28:46 +0000 (06:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162828 91177308-0d34-0410-b5e6-96231b3b80d8

17 files changed:
include/llvm/MC/MCAsmBackend.h
include/llvm/MC/MCAssembler.h
include/llvm/MC/MCCodeEmitter.h
include/llvm/MC/MCContext.h
include/llvm/MC/MCDwarf.h
include/llvm/MC/MCExpr.h
include/llvm/MC/MCLabel.h
include/llvm/MC/MCObjectWriter.h
include/llvm/MC/MCParser/AsmLexer.h
include/llvm/MC/MCParser/MCAsmLexer.h
include/llvm/MC/MCParser/MCAsmParser.h
include/llvm/MC/MCParser/MCAsmParserExtension.h
include/llvm/MC/MCSection.h
include/llvm/MC/MCStreamer.h
include/llvm/MC/MCSymbol.h
include/llvm/MC/MCTargetAsmLexer.h
include/llvm/MC/MCTargetAsmParser.h

index 05e6286b7cc5da661299d4a51678aa5dc812b6b9..43aceba3e14526c2de41fd01be2f5808e4888ecd 100644 (file)
@@ -30,8 +30,8 @@ class raw_ostream;
 
 /// MCAsmBackend - Generic interface to target specific assembler backends.
 class MCAsmBackend {
-  MCAsmBackend(const MCAsmBackend &);   // DO NOT IMPLEMENT
-  void operator=(const MCAsmBackend &);  // DO NOT IMPLEMENT
+  MCAsmBackend(const MCAsmBackend &) LLVM_DELETED_FUNCTION;
+  void operator=(const MCAsmBackend &) LLVM_DELETED_FUNCTION;
 protected: // Can only create subclasses.
   MCAsmBackend();
 
index d2b5c80a1a5a22c752e18748151adb5983cd0ab0..ac0ee18efb23ee7d771e7a3e4c05544119642f87 100644 (file)
@@ -40,8 +40,8 @@ class MCAsmBackend;
 class MCFragment : public ilist_node<MCFragment> {
   friend class MCAsmLayout;
 
-  MCFragment(const MCFragment&);     // DO NOT IMPLEMENT
-  void operator=(const MCFragment&); // DO NOT IMPLEMENT
+  MCFragment(const MCFragment&) LLVM_DELETED_FUNCTION;
+  void operator=(const MCFragment&) LLVM_DELETED_FUNCTION;
 
 public:
   enum FragmentType {
index 934ef69ce3fe80aa4f9ea71d0dbad89aa45d7aa2..4f7d1030600c25a489506a78bce4a505de1c166e 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef LLVM_MC_MCCODEEMITTER_H
 #define LLVM_MC_MCCODEEMITTER_H
 
+#include "llvm/Support/Compiler.h"
+
 namespace llvm {
 class MCFixup;
 class MCInst;
@@ -19,8 +21,8 @@ template<typename T> class SmallVectorImpl;
 /// MCCodeEmitter - Generic instruction encoding interface.
 class MCCodeEmitter {
 private:
-  MCCodeEmitter(const MCCodeEmitter &);   // DO NOT IMPLEMENT
-  void operator=(const MCCodeEmitter &);  // DO NOT IMPLEMENT
+  MCCodeEmitter(const MCCodeEmitter &) LLVM_DELETED_FUNCTION;
+  void operator=(const MCCodeEmitter &) LLVM_DELETED_FUNCTION;
 protected: // Can only create subclasses.
   MCCodeEmitter();
 
index 59545d31a6551bfecd90c77954fe142be1805e7e..23652f00d0aa310136743677f753a75fd4c05b28 100644 (file)
@@ -40,8 +40,8 @@ namespace llvm {
   /// of the sections that it creates.
   ///
   class MCContext {
-    MCContext(const MCContext&); // DO NOT IMPLEMENT
-    MCContext &operator=(const MCContext&); // DO NOT IMPLEMENT
+    MCContext(const MCContext&) LLVM_DELETED_FUNCTION;
+    MCContext &operator=(const MCContext&) LLVM_DELETED_FUNCTION;
   public:
     typedef StringMap<MCSymbol*, BumpPtrAllocator&> SymbolTable;
   private:
index fdb7ab23c09ff2b34672576e1c48c621356848ac..9e09ddf41100e3e1b014ade59df13f521a7e9d44 100644 (file)
@@ -19,6 +19,7 @@
 #include "llvm/MC/MachineLocation.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Dwarf.h"
+#include "llvm/Support/Compiler.h"
 #include <vector>
 
 namespace llvm {
@@ -48,8 +49,8 @@ namespace llvm {
     MCDwarfFile(StringRef name, unsigned dirIndex)
       : Name(name), DirIndex(dirIndex) {}
 
-    MCDwarfFile(const MCDwarfFile&);       // DO NOT IMPLEMENT
-    void operator=(const MCDwarfFile&); // DO NOT IMPLEMENT
+    MCDwarfFile(const MCDwarfFile&) LLVM_DELETED_FUNCTION;
+    void operator=(const MCDwarfFile&) LLVM_DELETED_FUNCTION;
   public:
     /// getName - Get the base name of this MCDwarfFile.
     StringRef getName() const { return Name; }
index ee7b144d6c602637e90e9f2d6c4a8ddcf56ffc4c..f36db3c05a3b7c76627416ef7e3c0afef6337e17 100644 (file)
@@ -41,8 +41,8 @@ public:
 private:
   ExprKind Kind;
 
-  MCExpr(const MCExpr&); // DO NOT IMPLEMENT
-  void operator=(const MCExpr&); // DO NOT IMPLEMENT
+  MCExpr(const MCExpr&) LLVM_DELETED_FUNCTION;
+  void operator=(const MCExpr&) LLVM_DELETED_FUNCTION;
 
   bool EvaluateAsAbsolute(int64_t &Res, const MCAssembler *Asm,
                           const MCAsmLayout *Layout,
index 727520d4af9dc979560008daf2965eea952d644b..c72aabd03a145c8d919845527abf76fe3502b601 100644 (file)
@@ -14,6 +14,8 @@
 #ifndef LLVM_MC_MCLABEL_H
 #define LLVM_MC_MCLABEL_H
 
+#include "llvm/Support/Compiler.h"
+
 namespace llvm {
   class MCContext;
   class raw_ostream;
@@ -30,8 +32,8 @@ namespace llvm {
     MCLabel(unsigned instance)
       : Instance(instance) {}
 
-    MCLabel(const MCLabel&);       // DO NOT IMPLEMENT
-    void operator=(const MCLabel&); // DO NOT IMPLEMENT
+    MCLabel(const MCLabel&) LLVM_DELETED_FUNCTION;
+    void operator=(const MCLabel&) LLVM_DELETED_FUNCTION;
   public:
     /// getInstance - Get the current instance of this Directional Local Label.
     unsigned getInstance() const { return Instance; }
index 9591a009461420901afd9290f56d13c9e4e321db..14fe75fd4c3104ad835d0dccc5f2f1a490488a71 100644 (file)
@@ -11,6 +11,7 @@
 #define LLVM_MC_MCOBJECTWRITER_H
 
 #include "llvm/Support/raw_ostream.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/DataTypes.h"
 #include <cassert>
 
@@ -35,8 +36,8 @@ class MCValue;
 /// The object writer also contains a number of helper methods for writing
 /// binary data to the output stream.
 class MCObjectWriter {
-  MCObjectWriter(const MCObjectWriter &); // DO NOT IMPLEMENT
-  void operator=(const MCObjectWriter &); // DO NOT IMPLEMENT
+  MCObjectWriter(const MCObjectWriter &) LLVM_DELETED_FUNCTION;
+  void operator=(const MCObjectWriter &) LLVM_DELETED_FUNCTION;
 
 protected:
   raw_ostream &OS;
index 9a8735f3e726b458cac9b55c2283e838cac10774..e102dfb82c4aab9ec95a854135b6a042ffabfb56 100644 (file)
@@ -31,8 +31,8 @@ class AsmLexer : public MCAsmLexer {
   const MemoryBuffer *CurBuf;
   bool isAtStartOfLine;
 
-  void operator=(const AsmLexer&); // DO NOT IMPLEMENT
-  AsmLexer(const AsmLexer&);       // DO NOT IMPLEMENT
+  void operator=(const AsmLexer&) LLVM_DELETED_FUNCTION;
+  AsmLexer(const AsmLexer&) LLVM_DELETED_FUNCTION;
 
 protected:
   /// LexToken - Read the next token and return its code.
index 5e29ad49dd3f9f63e1838be31eb172373a00f31b..ca163c50e3ceea1f180e57e81dc8f2987c336aa7 100644 (file)
@@ -11,6 +11,7 @@
 #define LLVM_MC_MCASMLEXER_H
 
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/SMLoc.h"
 
@@ -121,8 +122,8 @@ class MCAsmLexer {
   SMLoc ErrLoc;
   std::string Err;
 
-  MCAsmLexer(const MCAsmLexer &);   // DO NOT IMPLEMENT
-  void operator=(const MCAsmLexer &);  // DO NOT IMPLEMENT
+  MCAsmLexer(const MCAsmLexer &) LLVM_DELETED_FUNCTION;
+  void operator=(const MCAsmLexer &) LLVM_DELETED_FUNCTION;
 protected: // Can only create subclasses.
   const char *TokStart;
 
index 793c7097ba147361e9cfd592cbe9ff82af79c6e4..c673a79bd4077410f4b891ad779006d99a835eb2 100644 (file)
@@ -35,8 +35,8 @@ public:
   typedef bool (*DirectiveHandler)(MCAsmParserExtension*, StringRef, SMLoc);
 
 private:
-  MCAsmParser(const MCAsmParser &);   // DO NOT IMPLEMENT
-  void operator=(const MCAsmParser &);  // DO NOT IMPLEMENT
+  MCAsmParser(const MCAsmParser &) LLVM_DELETED_FUNCTION;
+  void operator=(const MCAsmParser &) LLVM_DELETED_FUNCTION;
 
   MCTargetAsmParser *TargetParser;
 
index 4e2aee992877c81be2785a58617f867c3aee17ab..59593a88e15ddab214f87adf3b4ff57ee5e00ed7 100644 (file)
@@ -21,8 +21,8 @@ class Twine;
 /// which is implemented by target and object file assembly parser
 /// implementations.
 class MCAsmParserExtension {
-  MCAsmParserExtension(const MCAsmParserExtension &);   // DO NOT IMPLEMENT
-  void operator=(const MCAsmParserExtension &);  // DO NOT IMPLEMENT
+  MCAsmParserExtension(const MCAsmParserExtension &) LLVM_DELETED_FUNCTION;
+  void operator=(const MCAsmParserExtension &) LLVM_DELETED_FUNCTION;
 
   MCAsmParser *Parser;
 
index 7da6534b6e88f06dfb00fb74bf3d7b782240685a..a92fc379e193461f540295b5e01d4a1ec502b7ea 100644 (file)
@@ -15,7 +15,7 @@
 #define LLVM_MC_MCSECTION_H
 
 #include "llvm/MC/SectionKind.h"
-#include "llvm/Support/Casting.h"
+#include "llvm/Support/Compiler.h"
 
 namespace llvm {
   class MCAsmInfo;
@@ -33,8 +33,8 @@ namespace llvm {
     };
 
   private:
-    MCSection(const MCSection&);      // DO NOT IMPLEMENT
-    void operator=(const MCSection&); // DO NOT IMPLEMENT
+    MCSection(const MCSection&) LLVM_DELETED_FUNCTION;
+    void operator=(const MCSection&) LLVM_DELETED_FUNCTION;
   protected:
     MCSection(SectionVariant V, SectionKind K) : Variant(V), Kind(K) {}
     SectionVariant Variant;
index 935f0cdaaad40a349d3eb4c5249624a596abfd23..91593b9061738433ed03d6da00ca36f8abee70f8 100644 (file)
@@ -47,8 +47,8 @@ namespace llvm {
   class MCStreamer {
     MCContext &Context;
 
-    MCStreamer(const MCStreamer&); // DO NOT IMPLEMENT
-    MCStreamer &operator=(const MCStreamer&); // DO NOT IMPLEMENT
+    MCStreamer(const MCStreamer&) LLVM_DELETED_FUNCTION;
+    MCStreamer &operator=(const MCStreamer&) LLVM_DELETED_FUNCTION;
 
     bool EmitEHFrame;
     bool EmitDebugFrame;
index 0583ce56820b08d2dc01ace823857055d89c90da..4c9e7f5ffdd34a10ea15d9bea439263ceaa8880c 100644 (file)
@@ -15,6 +15,7 @@
 #define LLVM_MC_MCSYMBOL_H
 
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Compiler.h"
 
 namespace llvm {
   class MCExpr;
@@ -62,8 +63,8 @@ namespace llvm {
       : Name(name), Section(0), Value(0),
         IsTemporary(isTemporary), IsUsed(false) {}
 
-    MCSymbol(const MCSymbol&);       // DO NOT IMPLEMENT
-    void operator=(const MCSymbol&); // DO NOT IMPLEMENT
+    MCSymbol(const MCSymbol&) LLVM_DELETED_FUNCTION;
+    void operator=(const MCSymbol&) LLVM_DELETED_FUNCTION;
   public:
     /// getName - Get the symbol name.
     StringRef getName() const { return Name; }
index f5c8c09df0ea084ecd02e7c55c190d6d1c384d76..d09fe0498e795a0b1fb5c9589fdfa5ba19ac656d 100644 (file)
@@ -24,8 +24,8 @@ class MCTargetAsmLexer {
   SMLoc ErrLoc;
   std::string Err;
 
-  MCTargetAsmLexer(const MCTargetAsmLexer &);   // DO NOT IMPLEMENT
-  void operator=(const MCTargetAsmLexer &);  // DO NOT IMPLEMENT
+  MCTargetAsmLexer(const MCTargetAsmLexer &) LLVM_DELETED_FUNCTION;
+  void operator=(const MCTargetAsmLexer &) LLVM_DELETED_FUNCTION;
 protected: // Can only create subclasses.
   MCTargetAsmLexer(const Target &);
 
index 91b604b716e058b68e0f74b900c5ed876d1baca5..36d7b32859f2d89dac5936d043b85d3da6f7d14f 100644 (file)
@@ -34,8 +34,8 @@ public:
   };
 
 private:
-  MCTargetAsmParser(const MCTargetAsmParser &);   // DO NOT IMPLEMENT
-  void operator=(const MCTargetAsmParser &);  // DO NOT IMPLEMENT
+  MCTargetAsmParser(const MCTargetAsmParser &) LLVM_DELETED_FUNCTION;
+  void operator=(const MCTargetAsmParser &) LLVM_DELETED_FUNCTION;
 protected: // Can only create subclasses.
   MCTargetAsmParser();