diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index ed4f01f176c2f..b1e688788c333 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -45,7 +45,6 @@ #include "llvm/Support/VirtualFileSystem.h" #include "llvm/Support/raw_ostream.h" #include -#include #include using namespace llvm; using namespace cl; @@ -2339,7 +2338,7 @@ class CategorizedHelpPrinter : public HelpPrinter { protected: void printOptions(StrOptionPairVector &Opts, size_t MaxArgLen) override { std::vector SortedCategories; - std::map> CategorizedOptions; + DenseMap> CategorizedOptions; // Collect registered option categories into vector in preparation for // sorting. @@ -2351,17 +2350,13 @@ class CategorizedHelpPrinter : public HelpPrinter { array_pod_sort(SortedCategories.begin(), SortedCategories.end(), OptionCategoryCompare); - // Create map to empty vectors. - for (OptionCategory *Category : SortedCategories) - CategorizedOptions[Category] = std::vector