[llvm] 61b8a8a - [sanstats] Hide unrelated options
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 18:08:40 PDT 2022
Author: Fangrui Song
Date: 2022-07-21T18:08:34-07:00
New Revision: 61b8a8a672457f2597979172ef2776206701d1ec
URL: https://github.com/llvm/llvm-project/commit/61b8a8a672457f2597979172ef2776206701d1ec
DIFF: https://github.com/llvm/llvm-project/commit/61b8a8a672457f2597979172ef2776206701d1ec.diff
LOG: [sanstats] Hide unrelated options
Added:
Modified:
llvm/tools/sanstats/sanstats.cpp
Removed:
################################################################################
diff --git a/llvm/tools/sanstats/sanstats.cpp b/llvm/tools/sanstats/sanstats.cpp
index 2ca0e2dca886b..a2dee8d59dcb0 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<std::string> ClInputFile(cl::Positional, cl::Required,
cl::desc("<filename>"));
static cl::opt<bool> 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");
More information about the llvm-commits
mailing list