mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Putting all the standard tool options into a "Generic" category.
Summary: This puts all the options that CommandLine.cpp implements into a category so that the APIs to hide options can not hide based on the generic category instead of string matching a partial list of argument strings. This patch is pretty simple and straight forward but it does impact the -help output of all tools using cl::opt. Specifically the options implemented in CommandLine.cpp (help, help-list, help-hidden, help-list-hidden, print-options, print-all-options, version) are all grouped together into an Option category, and these options are never hidden by the cl::HideUnrelatedOptions API. Reviewers: dexonsmith, chandlerc, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7150 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227093 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -240,6 +240,11 @@ TEST(CommandLineTest, HideUnrelatedOptions) {
|
||||
<< "Failed to hide extra option.";
|
||||
ASSERT_EQ(cl::NotHidden, TestOption2.getOptionHiddenFlag())
|
||||
<< "Hid extra option that should be visable.";
|
||||
|
||||
StringMap<cl::Option*> Map;
|
||||
cl::getRegisteredOptions(Map);
|
||||
ASSERT_EQ(cl::NotHidden, Map["help"]->getOptionHiddenFlag())
|
||||
<< "Hid default option that should be visable.";
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
Reference in New Issue
Block a user