add some missing API
authorChris Lattner <sabre@nondot.org>
Sat, 27 Jan 2007 08:19:03 +0000 (08:19 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 27 Jan 2007 08:19:03 +0000 (08:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33583 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/SmallPtrSet.h

index b9f7b1fc2650aab553002a03ef90d971110c0018..134a7da96c308b196ebe588eb499bae68fab951f 100644 (file)
@@ -67,6 +67,9 @@ public:
       delete[] CurArray;
   }
   
+  bool empty() const { return size() == 0; }
+  unsigned size() const { return NumElements; }
+  
   static void *getTombstoneMarker() { return reinterpret_cast<void*>(-2); }
   static void *getEmptyMarker() {
     // Note that -1 is chosen to make clear() efficiently implementable with