[clang] 734c223 - [clang-link-wrapper] Remove unneeded cl::ZeroOrMore for cl::opt options. NFC

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 3 22:02:15 PDT 2022


Author: Fangrui Song
Date: 2022-06-03T22:02:11-07:00
New Revision: 734c2234458c2f29b9696d8c3a7df9d32cc1766a

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

LOG: [clang-link-wrapper] Remove unneeded cl::ZeroOrMore for cl::opt options. NFC

Similar to 557efc9a8b68628c2c944678c6471dac30ed9e8e

Added: 
    

Modified: 
    clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Removed: 
    


################################################################################
diff  --git a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
index 74c03a26b884f..5ddda57454b23 100644
--- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
@@ -68,11 +68,11 @@ static cl::opt<std::string> LinkerUserPath("linker-path", cl::Required,
                                            cl::cat(ClangLinkerWrapperCategory));
 
 static cl::opt<std::string>
-    TargetFeatures("target-feature", cl::ZeroOrMore,
+    TargetFeatures("target-feature",
                    cl::desc("Target features for triple"),
                    cl::cat(ClangLinkerWrapperCategory));
 
-static cl::opt<std::string> OptLevel("opt-level", cl::ZeroOrMore,
+static cl::opt<std::string> OptLevel("opt-level",
                                      cl::desc("Optimization level for LTO"),
                                      cl::init("O2"),
                                      cl::cat(ClangLinkerWrapperCategory));
@@ -83,22 +83,22 @@ static cl::list<std::string>
                      cl::cat(ClangLinkerWrapperCategory));
 
 static cl::opt<bool> EmbedBitcode(
-    "target-embed-bc", cl::ZeroOrMore,
+    "target-embed-bc",
     cl::desc("Embed linked bitcode instead of an executable device image"),
-    cl::init(false), cl::cat(ClangLinkerWrapperCategory));
+    cl::cat(ClangLinkerWrapperCategory));
 
 static cl::opt<bool> DryRun(
-    "dry-run", cl::ZeroOrMore,
+    "dry-run",
     cl::desc("List the linker commands to be run without executing them"),
-    cl::init(false), cl::cat(ClangLinkerWrapperCategory));
+    cl::cat(ClangLinkerWrapperCategory));
 
 static cl::opt<bool>
-    PrintWrappedModule("print-wrapped-module", cl::ZeroOrMore,
+    PrintWrappedModule("print-wrapped-module",
                        cl::desc("Print the wrapped module's IR for testing"),
-                       cl::init(false), cl::cat(ClangLinkerWrapperCategory));
+                       cl::cat(ClangLinkerWrapperCategory));
 
 static cl::opt<std::string>
-    HostTriple("host-triple", cl::ZeroOrMore,
+    HostTriple("host-triple",
                cl::desc("Triple to use for the host compilation"),
                cl::init(sys::getDefaultTargetTriple()),
                cl::cat(ClangLinkerWrapperCategory));
@@ -114,9 +114,9 @@ static cl::list<std::string>
                cl::value_desc("<value> or <triple>=<value>"),
                cl::cat(ClangLinkerWrapperCategory));
 
-static cl::opt<bool> Verbose("v", cl::ZeroOrMore,
+static cl::opt<bool> Verbose("v",
                              cl::desc("Verbose output from tools"),
-                             cl::init(false),
+                             
                              cl::cat(ClangLinkerWrapperCategory));
 
 static cl::opt<DebugKind> DebugInfo(
@@ -126,11 +126,11 @@ static cl::opt<DebugKind> DebugInfo(
                           "Direction information"),
                clEnumValN(FullDebugInfo, "g", "Full debugging support")));
 
-static cl::opt<bool> SaveTemps("save-temps", cl::ZeroOrMore,
+static cl::opt<bool> SaveTemps("save-temps",
                                cl::desc("Save intermediary results."),
                                cl::cat(ClangLinkerWrapperCategory));
 
-static cl::opt<std::string> CudaPath("cuda-path", cl::ZeroOrMore,
+static cl::opt<std::string> CudaPath("cuda-path",
                                      cl::desc("Save intermediary results."),
                                      cl::cat(ClangLinkerWrapperCategory));
 


        


More information about the cfe-commits mailing list