aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-15 23:20:07 +0000
committerChris Lattner <sabre@nondot.org>2007-12-15 23:20:07 +0000
commit8f3dab88f7725c97103a8c91dd2605009d9c755e (patch)
tree18ec9a5f708bb3bcac6d37ee11027cb68ffc120a /Driver/clang.cpp
parent80e1715ddccff4b64cb47b1f26615cc0986f0c2f (diff)
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
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index b3e5c336c3..76080f804d 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 @@ static void AddPath(const std::string &Path, IncludeDirGroup Group,
/// 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 @@ static void InitializeIncludePaths(HeaderSearch &Headers, FileManager &FM,
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");