Have LeakDetector use a SmallPtrSet instead of an std::set.
authorOwen Anderson <resistor@mac.com>
Thu, 14 Aug 2008 20:40:10 +0000 (20:40 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 14 Aug 2008 20:40:10 +0000 (20:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54785 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/LeakDetector.cpp

index 4ad75b737334e072aeaea3046d0f23ae16b77a69..1bf9171553837c7fc0e8d0aaa78d9908c2fa9f08 100644 (file)
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Support/LeakDetector.h"
+#include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Streams.h"
 #include "llvm/Value.h"
-#include <set>
 using namespace llvm;
 
 namespace {
@@ -60,7 +60,7 @@ namespace {
 
       if (!Ts.empty()) {
         cerr << "Leaked " << Name << " objects found: " << Message << ":\n";
-        for (typename std::set<const T*>::iterator I = Ts.begin(),
+        for (typename SmallPtrSet<const T*, 8>::iterator I = Ts.begin(),
                E = Ts.end(); I != E; ++I) {
           cerr << "\t";
           PrinterTrait<T>::print(*I);
@@ -74,7 +74,7 @@ namespace {
     }
 
   private:
-    std::set<const T*> Ts;
+    SmallPtrSet<const T*, 8> Ts;
     const T* Cache;
     const char* const Name;
   };