Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 18 Feb 2013 23:11:17 +0000 (23:11 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 18 Feb 2013 23:11:17 +0000 (23:11 +0000)
Also removes some redundant DNI comments on function declarations already
using the macro.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175466 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/APFloat.h
include/llvm/ADT/ilist.h
include/llvm/Analysis/DependenceAnalysis.h
include/llvm/IR/Operator.h
include/llvm/IR/Use.h
include/llvm/Option/OptSpecifier.h
include/llvm/Support/raw_ostream.h
lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp

index a27f77db149293e8cf989aa6a0c3b1ca801c761c..14bcaef6d1656a034b229d8eb2b7131ce0332360 100644 (file)
@@ -300,7 +300,7 @@ namespace llvm {
     /* The definition of equality is not straightforward for floating point,
        so we won't use operator==.  Use one of the following, or write
        whatever it is you really mean. */
-    // bool operator==(const APFloat &) const;     // DO NOT IMPLEMENT
+    bool operator==(const APFloat &) const LLVM_DELETED_FUNCTION;
 
     /* IEEE comparison with another floating point number (NaNs
        compare unordered, 0==-0). */
index 20cdae32554a7eed6854cc756e7f5928bf5b3f96..aeb78484c61b221ab9ea9c1b4bfd8760f7eb703f 100644 (file)
@@ -234,17 +234,17 @@ public:
   pointer getNodePtrUnchecked() const { return NodePtr; }
 };
 
-// do not implement. this is to catch errors when people try to use
-// them as random access iterators
+// These are to catch errors when people try to use them as random access
+// iterators.
 template<typename T>
-void operator-(int, ilist_iterator<T>);
+void operator-(int, ilist_iterator<T>) LLVM_DELETED_FUNCTION;
 template<typename T>
-void operator-(ilist_iterator<T>,int);
+void operator-(ilist_iterator<T>,int) LLVM_DELETED_FUNCTION;
 
 template<typename T>
-void operator+(int, ilist_iterator<T>);
+void operator+(int, ilist_iterator<T>) LLVM_DELETED_FUNCTION;
 template<typename T>
-void operator+(ilist_iterator<T>,int);
+void operator+(ilist_iterator<T>,int) LLVM_DELETED_FUNCTION;
 
 // operator!=/operator== - Allow mixed comparisons without dereferencing
 // the iterator, which could very likely be pointing to end().
index f49efd970a9a26190495a5a87f8f1aa267c8e5c9..d0ead3969471cbec33fe2fb22f87a97c4f0a7911 100644 (file)
@@ -244,8 +244,8 @@ namespace llvm {
   /// DependenceAnalysis - This class is the main dependence-analysis driver.
   ///
   class DependenceAnalysis : public FunctionPass {
-    void operator=(const DependenceAnalysis &);     // do not implement
-    DependenceAnalysis(const DependenceAnalysis &); // do not implement
+    void operator=(const DependenceAnalysis &) LLVM_DELETED_FUNCTION;
+    DependenceAnalysis(const DependenceAnalysis &) LLVM_DELETED_FUNCTION;
   public:
     /// depends - Tests for a dependence between the Src and Dst instructions.
     /// Returns NULL if no dependence; otherwise, returns a Dependence (or a
index 879707cd24f4083935f64a1f905d00f6f979f4d5..13ab72cfefc85be832aea50755cde14b4ef23845 100644 (file)
@@ -33,8 +33,8 @@ class ConstantExpr;
 ///
 class Operator : public User {
 private:
-  // Do not implement any of these. The Operator class is intended to be used
-  // as a utility, and is never itself instantiated.
+  // The Operator class is intended to be used as a utility, and is never itself
+  // instantiated.
   void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
   void *operator new(size_t s) LLVM_DELETED_FUNCTION;
   Operator() LLVM_DELETED_FUNCTION;
index 60b2fc0b1c121662e6171f5ed6e1e470ac6e81f5..33a69c46866571dbd45b989f5b78dfc7397b8403 100644 (file)
@@ -66,7 +66,6 @@ public:
   typedef PointerIntPair<User*, 1, unsigned> UserRef;
 
 private:
-  /// Copy ctor - do not implement
   Use(const Use &U) LLVM_DELETED_FUNCTION;
 
   /// Destructor - Only for zap()
index 188317f6c5b1b5d03314c992b1acad25cc81eed7..02bc6b175edbaab09960cfecc41488d29ea5a544 100644 (file)
@@ -19,7 +19,7 @@ namespace opt {
     unsigned ID;
 
   private:
-    explicit OptSpecifier(bool); // DO NOT IMPLEMENT
+    explicit OptSpecifier(bool) LLVM_DELETED_FUNCTION;
 
   public:
     OptSpecifier() : ID(0) {}
index eab0f2d8057ee62d80d67769a2b2cb7981c2e808..d2b4a2af278a18f7d0126c6ee6ac021ef8508b20 100644 (file)
@@ -29,7 +29,6 @@ namespace llvm {
 /// a chunk at a time.
 class raw_ostream {
 private:
-  // Do not implement. raw_ostream is noncopyable.
   void operator=(const raw_ostream &) LLVM_DELETED_FUNCTION;
   raw_ostream(const raw_ostream &) LLVM_DELETED_FUNCTION;
 
index 8d45198957820a2b15b70f2492ff6778eb23364b..d5d995b95efda701733a3a2512c9ebe36c7776ad 100644 (file)
@@ -29,8 +29,8 @@ using namespace llvm;
 
 namespace {
 class AArch64MCCodeEmitter : public MCCodeEmitter {
-  AArch64MCCodeEmitter(const AArch64MCCodeEmitter &); // DO NOT IMPLEMENT
-  void operator=(const AArch64MCCodeEmitter &); // DO NOT IMPLEMENT
+  AArch64MCCodeEmitter(const AArch64MCCodeEmitter &) LLVM_DELETED_FUNCTION;
+  void operator=(const AArch64MCCodeEmitter &) LLVM_DELETED_FUNCTION;
   const MCInstrInfo &MCII;
   const MCSubtargetInfo &STI;
   MCContext &Ctx;
index 5a315cbbf8b2a76a3b6da624902ca20a258cdff6..d20716000d3ce4d55b69bb48649ce6e1c6c1c6f8 100644 (file)
@@ -38,8 +38,8 @@ using namespace llvm;
 namespace {
 
 class R600MCCodeEmitter : public AMDGPUMCCodeEmitter {
-  R600MCCodeEmitter(const R600MCCodeEmitter &); // DO NOT IMPLEMENT
-  void operator=(const R600MCCodeEmitter &); // DO NOT IMPLEMENT
+  R600MCCodeEmitter(const R600MCCodeEmitter &) LLVM_DELETED_FUNCTION;
+  void operator=(const R600MCCodeEmitter &) LLVM_DELETED_FUNCTION;
   const MCInstrInfo &MCII;
   const MCRegisterInfo &MRI;
   const MCSubtargetInfo &STI;
index 0d9f3d814092a89a21c1e2fbe87384d643086bb4..2bf8fb85d6dd55a43a6a22a8aa3b715f072956e2 100644 (file)
@@ -35,8 +35,8 @@ typedef union {
 } IntFloatUnion;
 
 class SIMCCodeEmitter : public  AMDGPUMCCodeEmitter {
-  SIMCCodeEmitter(const SIMCCodeEmitter &); // DO NOT IMPLEMENT
-  void operator=(const SIMCCodeEmitter &); // DO NOT IMPLEMENT
+  SIMCCodeEmitter(const SIMCCodeEmitter &) LLVM_DELETED_FUNCTION;
+  void operator=(const SIMCCodeEmitter &) LLVM_DELETED_FUNCTION;
   const MCInstrInfo &MCII;
   const MCRegisterInfo &MRI;
   const MCSubtargetInfo &STI;