MIR Parser: Report an error when a jump table entry is redefined.
[oota-llvm.git] / include / llvm / ADT / SparseMultiSet.h
index d2b2f8d9b6bd49574db98edd2e8a08a6561b7dcd..e3aa2589b79fb2707d73bc06d89efe61b65bb06e 100644 (file)
@@ -133,8 +133,8 @@ class SparseMultiSet {
 
   // Disable copy construction and assignment.
   // This data structure is not meant to be used that way.
-  SparseMultiSet(const SparseMultiSet&) LLVM_DELETED_FUNCTION;
-  SparseMultiSet &operator=(const SparseMultiSet&) LLVM_DELETED_FUNCTION;
+  SparseMultiSet(const SparseMultiSet&) = delete;
+  SparseMultiSet &operator=(const SparseMultiSet&) = delete;
 
   /// Whether the given entry is the head of the list. List heads's previous
   /// pointers are to the tail of the list, allowing for efficient access to the
@@ -185,6 +185,7 @@ public:
   typedef const ValueT &const_reference;
   typedef ValueT *pointer;
   typedef const ValueT *const_pointer;
+  typedef unsigned size_type;
 
   SparseMultiSet()
     : Sparse(nullptr), Universe(0), FreelistIdx(SMSNode::INVALID), NumFree(0) {}
@@ -327,7 +328,7 @@ public:
   /// This is not the same as BitVector::size() which returns the size of the
   /// universe.
   ///
-  unsigned size() const {
+  size_type size() const {
     assert(NumFree <= Dense.size() && "Out-of-bounds free entries");
     return Dense.size() - NumFree;
   }
@@ -378,7 +379,7 @@ public:
 
   /// Returns the number of elements identified by Key. This will be linear in
   /// the number of elements of that key.
-  unsigned count(const KeyT &Key) const {
+  size_type count(const KeyT &Key) const {
     unsigned Ret = 0;
     for (const_iterator It = find(Key); It != end(); ++It)
       ++Ret;