From 61b8a8a672457f2597979172ef2776206701d1ec Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 21 Jul 2022 18:08:33 -0700 Subject: [PATCH] [sanstats] Hide unrelated options --- llvm/tools/sanstats/sanstats.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm/tools/sanstats/sanstats.cpp b/llvm/tools/sanstats/sanstats.cpp index 2ca0e2d..a2dee8d 100644 --- a/llvm/tools/sanstats/sanstats.cpp +++ b/llvm/tools/sanstats/sanstats.cpp @@ -23,11 +23,14 @@ using namespace llvm; +static cl::OptionCategory Cat("sanstats Options"); + static cl::opt ClInputFile(cl::Positional, cl::Required, cl::desc("")); static cl::opt ClDemangle("demangle", cl::init(false), - cl::desc("Print demangled function name.")); + cl::desc("Print demangled function name"), + cl::cat(Cat)); inline uint64_t KindFromData(uint64_t Data, char SizeofPtr) { return Data >> (SizeofPtr * 8 - kSanitizerStatKindBits); @@ -123,6 +126,7 @@ static const char *ReadModule(char SizeofPtr, const char *Begin, } int main(int argc, char **argv) { + cl::HideUnrelatedOptions(Cat); cl::ParseCommandLineOptions(argc, argv, "Sanitizer Statistics Processing Tool"); -- 2.7.4