diff options
author | Timm Bäder <tbaeder@redhat.com> | 2021-07-16 10:17:41 +0200 |
---|---|---|
committer | Timm Bäder <tbaeder@redhat.com> | 2021-07-16 10:43:52 +0200 |
commit | 69a56845317b340e01e75d0cff8fb2f90f6fe1d2 (patch) | |
tree | c490654a12d555a652bc481da1cf9416ff81e3ba /llvm/tools/llvm-cfi-verify | |
parent | 918bda1241202d0480c6d94ec8f72c483d77a06c (diff) | |
download | llvm-69a56845317b340e01e75d0cff8fb2f90f6fe1d2.zip llvm-69a56845317b340e01e75d0cff8fb2f90f6fe1d2.tar.gz llvm-69a56845317b340e01e75d0cff8fb2f90f6fe1d2.tar.bz2 |
[llvm][tools] Hide unrelated llvm-cfi-verify options
Differential Revision: https://reviews.llvm.org/D106055
Diffstat (limited to 'llvm/tools/llvm-cfi-verify')
-rw-r--r-- | llvm/tools/llvm-cfi-verify/llvm-cfi-verify.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/llvm/tools/llvm-cfi-verify/llvm-cfi-verify.cpp b/llvm/tools/llvm-cfi-verify/llvm-cfi-verify.cpp index 1331442b..3cb0e84 100644 --- a/llvm/tools/llvm-cfi-verify/llvm-cfi-verify.cpp +++ b/llvm/tools/llvm-cfi-verify/llvm-cfi-verify.cpp @@ -32,21 +32,24 @@ using namespace llvm; using namespace llvm::object; using namespace llvm::cfi_verify; +static cl::OptionCategory CFIVerifyCategory("CFI Verify Options"); + cl::opt<std::string> InputFilename(cl::Positional, cl::desc("<input file>"), - cl::Required); + cl::Required, cl::cat(CFIVerifyCategory)); cl::opt<std::string> BlacklistFilename(cl::Positional, cl::desc("[blacklist file]"), - cl::init("-")); + cl::init("-"), + cl::cat(CFIVerifyCategory)); cl::opt<bool> PrintGraphs( "print-graphs", cl::desc("Print graphs around indirect CF instructions in DOT format."), - cl::init(false)); + cl::init(false), cl::cat(CFIVerifyCategory)); cl::opt<unsigned> PrintBlameContext( "blame-context", cl::desc("Print the blame context (if possible) for BAD instructions. This " "specifies the number of lines of context to include, where zero " "disables this feature."), - cl::init(0)); + cl::init(0), cl::cat(CFIVerifyCategory)); cl::opt<unsigned> PrintBlameContextAll( "blame-context-all", cl::desc("Prints the blame context (if possible) for ALL instructions. " @@ -54,9 +57,9 @@ cl::opt<unsigned> PrintBlameContextAll( "instructions (see --blame-context). If --blame-context is " "unspecified, it prints this number of contextual lines for BAD " "instructions as well."), - cl::init(0)); + cl::init(0), cl::cat(CFIVerifyCategory)); cl::opt<bool> Summarize("summarize", cl::desc("Print the summary only."), - cl::init(false)); + cl::init(false), cl::cat(CFIVerifyCategory)); ExitOnError ExitOnErr; @@ -245,6 +248,7 @@ printIndirectCFInstructions(FileAnalysis &Analysis, } int main(int argc, char **argv) { + cl::HideUnrelatedOptions({&CFIVerifyCategory, &getColorCategory()}); cl::ParseCommandLineOptions( argc, argv, "Identifies whether Control Flow Integrity protects all indirect control " |