aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-06-21 15:30:50 +0200
committerNikita Popov <npopov@redhat.com>2024-06-21 15:45:17 +0200
commit30299b87171cbad2dacb8b1ec0e75801785f16d9 (patch)
tree4f22b45280b391b22c954aea51f3711b8f7b6af7 /llvm/lib/Support/CommandLine.cpp
parent4232dd586b65c9301304cab2fb166d8df97c591a (diff)
downloadllvm-30299b87171cbad2dacb8b1ec0e75801785f16d9.zip
llvm-30299b87171cbad2dacb8b1ec0e75801785f16d9.tar.gz
llvm-30299b87171cbad2dacb8b1ec0e75801785f16d9.tar.bz2
[CommandLine] Avoid ManagedStatic.h include (NFC)
The two variables using ManagedStatic that are exported by this header are not actually used anywhere -- they are used through SubCommand::getTopLevel() and SubCommand::getAll() instead. Drop the extern declarations and the include.
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 8a00d47..6dc0c86 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -455,10 +455,10 @@ void OptionCategory::registerCategory() {
// initialization because it is referenced from cl::opt constructors, which run
// dynamically in an arbitrary order.
LLVM_REQUIRE_CONSTANT_INITIALIZATION
-ManagedStatic<SubCommand> llvm::cl::TopLevelSubCommand;
+static ManagedStatic<SubCommand> TopLevelSubCommand;
// A special subcommand that can be used to put an option into all subcommands.
-ManagedStatic<SubCommand> llvm::cl::AllSubCommands;
+static ManagedStatic<SubCommand> AllSubCommands;
SubCommand &SubCommand::getTopLevel() { return *TopLevelSubCommand; }