/// Some tools (like clang-format) like to be able to hide all options that are
/// not specific to the tool. This function allows a tool to specify a single
/// option category to display in the -help output.
-void HideUnrelatedOptions(ArrayRef<cl::OptionCategory *> Categories);
+void HideUnrelatedOptions(ArrayRef<const cl::OptionCategory *> Categories);
} // End namespace cl
}
}
-void cl::HideUnrelatedOptions(ArrayRef<cl::OptionCategory *> Categories) {
+void cl::HideUnrelatedOptions(ArrayRef<const cl::OptionCategory *> Categories) {
auto CategoriesBegin = Categories.begin();
auto CategoriesEnd = Categories.end();
StringMap<cl::Option *> Options;
cl::opt<int> TestOption2("test-option-2", cl::cat(TestCategory));
cl::opt<int> TestOption3("test-option-3", cl::cat(TestCategory2));
- cl::OptionCategory *VisibleCategories[] = {&TestCategory, &TestCategory2};
+ const cl::OptionCategory *VisibleCategories[] = {&TestCategory,
+ &TestCategory2};
cl::HideUnrelatedOptions(makeArrayRef(VisibleCategories));