diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-20 05:12:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-20 05:12:14 +0000 |
commit | 67aead68beae1fca4c53e92a1682364ba8cb497d (patch) | |
tree | 237365c04836bdc5750f48879373077f9fec30b7 /lib/Support/CommandLine.cpp | |
parent | 14aae60b69e069c9a8ac805a9e46e215757b2efc (diff) |
switch to SmallPtrSet instead of std::set, saving 1K from the
release-asserts .o file (72900->71856).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/CommandLine.cpp')
-rw-r--r-- | lib/Support/CommandLine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 2e69b11d2b..f5ce5a7123 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -25,12 +25,12 @@ #include "llvm/System/Host.h" #include "llvm/System/Path.h" #include "llvm/ADT/OwningPtr.h" -#include "llvm/ADT/StringMap.h" +#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallString.h" +#include "llvm/ADT/StringMap.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Twine.h" #include "llvm/Config/config.h" -#include <set> #include <cerrno> #include <cstdlib> using namespace llvm; @@ -1039,7 +1039,7 @@ public: StringMap<Option*> OptMap; GetOptionInfo(PositionalOpts, SinkOpts, OptMap); - // Copy Options into a vector so we can sort them as we like... + // Copy Options into a vector so we can sort them as we like. std::vector<Option*> Opts; for (StringMap<Option*>::iterator I = OptMap.begin(), E = OptMap.end(); I != E; ++I) { @@ -1053,7 +1053,7 @@ public: // Eliminate duplicate entries in table (from enum flags options, f.e.) { // Give OptionSet a scope - std::set<Option*> OptionSet; + SmallPtrSet<Option*, 32> OptionSet; for (unsigned i = 0; i != Opts.size(); ++i) if (OptionSet.count(Opts[i]) == 0) OptionSet.insert(Opts[i]); // Add new entry to set |