summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-20 05:12:14 +0000
committerChris Lattner <sabre@nondot.org>2009-09-20 05:12:14 +0000
commit41f8b0b7a65fed974b66341864ba58625858765a (patch)
tree50fcfc10d3043436749da65ef72d93a52e694627 /llvm/lib/Support/CommandLine.cpp
parentf74e28abfaeb544270a7b2b76528efe0d38a3157 (diff)
downloadbcm5719-llvm-41f8b0b7a65fed974b66341864ba58625858765a.tar.gz
bcm5719-llvm-41f8b0b7a65fed974b66341864ba58625858765a.zip
switch to SmallPtrSet instead of std::set, saving 1K from the
release-asserts .o file (72900->71856). llvm-svn: 82364
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 2e69b11d2bd..f5ce5a71232 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud