From 488639ad3b37ce0796d741b4b3a0f296b6b56ecc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 20 Sep 2009 05:12:14 +0000 Subject: [PATCH] switch to SmallPtrSet instead of std::set, saving 1K from the release-asserts .o file (72900->71856). llvm-svn: 82364 --- lib/Support/CommandLine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 2e69b11d2bd..f5ce5a71232 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 #include #include using namespace llvm; @@ -1039,7 +1039,7 @@ public: StringMap 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 Opts; for (StringMap::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 OptionSet; + SmallPtrSet OptionSet; for (unsigned i = 0; i != Opts.size(); ++i) if (OptionSet.count(Opts[i]) == 0) OptionSet.insert(Opts[i]); // Add new entry to set