[llvm] d805aab - [verify-uselistorder] Hide unrelated options

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 18:41:33 PDT 2022


Author: Fangrui Song
Date: 2022-07-21T18:41:28-07:00
New Revision: d805aabe8ff79c71f29c6cc957514cd9f71fc252

URL: https://github.com/llvm/llvm-project/commit/d805aabe8ff79c71f29c6cc957514cd9f71fc252
DIFF: https://github.com/llvm/llvm-project/commit/d805aabe8ff79c71f29c6cc957514cd9f71fc252.diff

LOG: [verify-uselistorder] Hide unrelated options

Added: 
    

Modified: 
    llvm/tools/verify-uselistorder/verify-uselistorder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/verify-uselistorder/verify-uselistorder.cpp b/llvm/tools/verify-uselistorder/verify-uselistorder.cpp
index dd45209a134a3..e28c33da840a3 100644
--- a/llvm/tools/verify-uselistorder/verify-uselistorder.cpp
+++ b/llvm/tools/verify-uselistorder/verify-uselistorder.cpp
@@ -53,18 +53,20 @@ using namespace llvm;
 
 #define DEBUG_TYPE "uselistorder"
 
+static cl::OptionCategory Cat("verify-uselistorder Options");
+
 static cl::opt<std::string> InputFilename(cl::Positional,
                                           cl::desc("<input bitcode file>"),
                                           cl::init("-"),
                                           cl::value_desc("filename"));
 
 static cl::opt<bool> SaveTemps("save-temps", cl::desc("Save temp files"),
-                               cl::init(false));
+                               cl::cat(Cat));
 
 static cl::opt<unsigned>
     NumShuffles("num-shuffles",
                 cl::desc("Number of times to shuffle and verify use-lists"),
-                cl::init(1));
+                cl::init(1), cl::cat(Cat));
 
 namespace {
 
@@ -530,6 +532,7 @@ int main(int argc, char **argv) {
   // Enable debug stream buffering.
   EnableDebugBuffering = true;
 
+  cl::HideUnrelatedOptions(Cat);
   cl::ParseCommandLineOptions(argc, argv,
                               "llvm tool to verify use-list order\n");
 


        


More information about the llvm-commits mailing list