[llvm] e53ce96 - StandardInstrumentations: Internalize some cl::opt

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 22:58:19 PST 2022


Author: Fangrui Song
Date: 2022-11-23T22:58:14-08:00
New Revision: e53ce9618a2fc54fc2ce7a99c6ca26cfaba0c6fc

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

LOG: StandardInstrumentations: Internalize some cl::opt

Added: 
    

Modified: 
    llvm/lib/Passes/StandardInstrumentations.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Passes/StandardInstrumentations.cpp b/llvm/lib/Passes/StandardInstrumentations.cpp
index 312a5a0bf10df..311d773d6a9ca 100644
--- a/llvm/lib/Passes/StandardInstrumentations.cpp
+++ b/llvm/lib/Passes/StandardInstrumentations.cpp
@@ -71,22 +71,23 @@ static cl::opt<std::string>
 // An option that determines the colour used for elements that are only
 // in the before part.  Must be a colour named in appendix J of
 // https://graphviz.org/pdf/dotguide.pdf
-cl::opt<std::string>
+static cl::opt<std::string>
     BeforeColour("dot-cfg-before-color",
-                 cl::desc("Color for dot-cfg before elements."), cl::Hidden,
+                 cl::desc("Color for dot-cfg before elements"), cl::Hidden,
                  cl::init("red"));
 // An option that determines the colour used for elements that are only
 // in the after part.  Must be a colour named in appendix J of
 // https://graphviz.org/pdf/dotguide.pdf
-cl::opt<std::string> AfterColour("dot-cfg-after-color",
-                                 cl::desc("Color for dot-cfg after elements."),
-                                 cl::Hidden, cl::init("forestgreen"));
+static cl::opt<std::string>
+    AfterColour("dot-cfg-after-color",
+                cl::desc("Color for dot-cfg after elements"), cl::Hidden,
+                cl::init("forestgreen"));
 // An option that determines the colour used for elements that are in both
 // the before and after parts.  Must be a colour named in appendix J of
 // https://graphviz.org/pdf/dotguide.pdf
-cl::opt<std::string>
+static cl::opt<std::string>
     CommonColour("dot-cfg-common-color",
-                 cl::desc("Color for dot-cfg common elements."), cl::Hidden,
+                 cl::desc("Color for dot-cfg common elements"), cl::Hidden,
                  cl::init("black"));
 
 // An option that determines where the generated website file (named
@@ -100,7 +101,7 @@ static cl::opt<std::string> DotCfgDir(
 static cl::opt<bool>
     PrintCrashIR("print-on-crash",
                  cl::desc("Print the last form of the IR before crash"),
-                 cl::init(false), cl::Hidden);
+                 cl::Hidden);
 
 static cl::opt<std::string> OptBisectPrintIRPath(
     "opt-bisect-print-ir-path",


        


More information about the llvm-commits mailing list