[llvm] [NFC]Make file-local cl::opt global variables static (PR #126486)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 01:46:23 PST 2025
================
@@ -25,30 +25,31 @@
using namespace llvm;
-cl::OptionCategory CXXMapCategory("CXX Map Options");
-
-cl::opt<std::string> OldSymbolFile(cl::Positional, cl::Required,
- cl::desc("<symbol-file>"),
- cl::cat(CXXMapCategory));
-cl::opt<std::string> NewSymbolFile(cl::Positional, cl::Required,
- cl::desc("<symbol-file>"),
- cl::cat(CXXMapCategory));
-cl::opt<std::string> RemappingFile("remapping-file", cl::Required,
- cl::desc("Remapping file"),
- cl::cat(CXXMapCategory));
+static cl::OptionCategory CXXMapCategory("CXX Map Options");
+
+static cl::opt<std::string> OldSymbolFile(cl::Positional, cl::Required,
+ cl::desc("<symbol-file>"),
+ cl::cat(CXXMapCategory));
+static cl::opt<std::string> NewSymbolFile(cl::Positional, cl::Required,
+ cl::desc("<symbol-file>"),
+ cl::cat(CXXMapCategory));
+static cl::opt<std::string> RemappingFile("remapping-file", cl::Required,
+ cl::desc("Remapping file"),
+ cl::cat(CXXMapCategory));
cl::alias RemappingFileA("r", cl::aliasopt(RemappingFile),
----------------
s-barannikov wrote:
Should be static as well. There are more occurrences of `cl::alias` in other files.
https://github.com/llvm/llvm-project/pull/126486
More information about the llvm-commits
mailing list