#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdlib>
+#include <map>
#include <string>
using namespace llvm;
using namespace cl;
protected:
void printOptions(StrOptionPairVector &Opts, size_t MaxArgLen) override {
std::vector<OptionCategory *> SortedCategories;
- DenseMap<OptionCategory *, std::vector<Option *>> CategorizedOptions;
+ std::map<OptionCategory *, std::vector<Option *>> CategorizedOptions;
// Collect registered option categories into vector in preparation for
// sorting.
array_pod_sort(SortedCategories.begin(), SortedCategories.end(),
OptionCategoryCompare);
+ // Create map to empty vectors.
+ for (OptionCategory *Category : SortedCategories)
+ CategorizedOptions[Category] = std::vector<Option *>();
+
// Walk through pre-sorted options and assign into categories.
// Because the options are already alphabetically sorted the
// options within categories will also be alphabetically sorted.