diff options
| author | Chris Bieneman <beanz@apple.com> | 2015-01-27 00:42:00 +0000 |
|---|---|---|
| committer | Chris Bieneman <beanz@apple.com> | 2015-01-27 00:42:00 +0000 |
| commit | fd3dbd940393ecfe9e7784664a1d189fa927aec8 (patch) | |
| tree | f24e169d8e81e51b64b347817804efe0902d9470 | |
| parent | 199e7c125e5479968e9608c6318c391ff54ee2e4 (diff) | |
| download | bcm5719-llvm-fd3dbd940393ecfe9e7784664a1d189fa927aec8.tar.gz bcm5719-llvm-fd3dbd940393ecfe9e7784664a1d189fa927aec8.zip | |
One more fix to the new API to fix const-correctness.
llvm-svn: 227154
| -rw-r--r-- | llvm/include/llvm/Support/CommandLine.h | 2 | ||||
| -rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 2 | ||||
| -rw-r--r-- | llvm/unittests/Support/CommandLineTest.cpp | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index c0e9d972498..efa17219585 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/include/llvm/Support/CommandLine.h @@ -1939,7 +1939,7 @@ void HideUnrelatedOptions(cl::OptionCategory &Category); /// 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 diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index f17d1f69ad6..35c49be02ce 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -1861,7 +1861,7 @@ void cl::HideUnrelatedOptions(cl::OptionCategory &Category) { } } -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; diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp index 750559341cf..8e84bd93072 100644 --- a/llvm/unittests/Support/CommandLineTest.cpp +++ b/llvm/unittests/Support/CommandLineTest.cpp @@ -254,7 +254,8 @@ TEST(CommandLineTest, HideUnrelatedOptionsMulti) { 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)); |

