swtich to smallptrset, which is more efficient than std::set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45065 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index b3e5c33..76080f8 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -34,6 +34,7 @@
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
+#include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/System/Signals.h"
@@ -648,10 +649,10 @@
 /// RemoveDuplicates - If there are duplicate directory entries in the specified
 /// search list, remove the later (dead) ones.
 static void RemoveDuplicates(std::vector<DirectoryLookup> &SearchList) {
-  std::set<const DirectoryEntry *> SeenDirs;
+  llvm::SmallPtrSet<const DirectoryEntry *, 8> SeenDirs;
   for (unsigned i = 0; i != SearchList.size(); ++i) {
     // If this isn't the first time we've seen this dir, remove it.
-    if (!SeenDirs.insert(SearchList[i].getDir()).second) {
+    if (!SeenDirs.insert(SearchList[i].getDir())) {
       if (Verbose)
         fprintf(stderr, "ignoring duplicate directory \"%s\"\n",
                 SearchList[i].getDir()->getName());
@@ -794,6 +795,7 @@
       fprintf(stderr, " %s", SearchList[i].getDir()->getName());
       if (SearchList[i].isFramework())
         fprintf(stderr, " (framework directory)");
+      // FIXME: Print (headermap)"
       fprintf(stderr, "\n");
     }
     fprintf(stderr, "End of search list.\n");