@@ -32,31 +32,34 @@ using namespace llvm;
32
32
using namespace llvm ::object;
33
33
using namespace llvm ::cfi_verify;
34
34
35
+ static cl::OptionCategory CFIVerifyCategory (" CFI Verify Options" );
36
+
35
37
cl::opt<std::string> InputFilename (cl::Positional, cl::desc(" <input file>" ),
36
- cl::Required);
38
+ cl::Required, cl::cat(CFIVerifyCategory) );
37
39
cl::opt<std::string> BlacklistFilename (cl::Positional,
38
40
cl::desc (" [blacklist file]" ),
39
- cl::init(" -" ));
41
+ cl::init(" -" ),
42
+ cl::cat(CFIVerifyCategory));
40
43
cl::opt<bool > PrintGraphs (
41
44
" print-graphs" ,
42
45
cl::desc (" Print graphs around indirect CF instructions in DOT format." ),
43
- cl::init(false ));
46
+ cl::init(false ), cl::cat(CFIVerifyCategory) );
44
47
cl::opt<unsigned > PrintBlameContext (
45
48
" blame-context" ,
46
49
cl::desc (" Print the blame context (if possible) for BAD instructions. This "
47
50
" specifies the number of lines of context to include, where zero "
48
51
" disables this feature." ),
49
- cl::init(0 ));
52
+ cl::init(0 ), cl::cat(CFIVerifyCategory) );
50
53
cl::opt<unsigned > PrintBlameContextAll (
51
54
" blame-context-all" ,
52
55
cl::desc (" Prints the blame context (if possible) for ALL instructions. "
53
56
" This specifies the number of lines of context for non-BAD "
54
57
" instructions (see --blame-context). If --blame-context is "
55
58
" unspecified, it prints this number of contextual lines for BAD "
56
59
" instructions as well." ),
57
- cl::init(0 ));
60
+ cl::init(0 ), cl::cat(CFIVerifyCategory) );
58
61
cl::opt<bool > Summarize (" summarize" , cl::desc(" Print the summary only." ),
59
- cl::init(false ));
62
+ cl::init(false ), cl::cat(CFIVerifyCategory) );
60
63
61
64
ExitOnError ExitOnErr;
62
65
@@ -245,6 +248,7 @@ printIndirectCFInstructions(FileAnalysis &Analysis,
245
248
}
246
249
247
250
int main (int argc, char **argv) {
251
+ cl::HideUnrelatedOptions ({&CFIVerifyCategory, &ColorCategory});
248
252
cl::ParseCommandLineOptions (
249
253
argc, argv,
250
254
" Identifies whether Control Flow Integrity protects all indirect control "
0 commit comments