summaryrefslogtreecommitdiffstats
path: root/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-12 22:09:17 +0000
committerChris Lattner <sabre@nondot.org>2006-10-12 22:09:17 +0000
commit500d8bff2077ac327deec076fc8793e740b358c0 (patch)
treef55b3970886b7168e90717ccea0518d690e2286f /lib/Support/CommandLine.cpp
parent15bdc96c5b5473691b653e63ffea47a7c7b2c8c1 (diff)
downloadexternal_llvm-500d8bff2077ac327deec076fc8793e740b358c0.zip
external_llvm-500d8bff2077ac327deec076fc8793e740b358c0.tar.gz
external_llvm-500d8bff2077ac327deec076fc8793e740b358c0.tar.bz2
shrink anon-ns and mark stuff static. No functionality changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/CommandLine.cpp')
-rw-r--r--lib/Support/CommandLine.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 4a3ccfa..cd90312 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -952,23 +952,25 @@ public:
exit(1);
}
};
+} // End anonymous namespace
// Define the two HelpPrinter instances that are used to print out help, or
// help-hidden...
//
-HelpPrinter NormalPrinter(false);
-HelpPrinter HiddenPrinter(true);
+static HelpPrinter NormalPrinter(false);
+static HelpPrinter HiddenPrinter(true);
-cl::opt<HelpPrinter, true, parser<bool> >
+static cl::opt<HelpPrinter, true, parser<bool> >
HOp("help", cl::desc("Display available options (--help-hidden for more)"),
cl::location(NormalPrinter), cl::ValueDisallowed);
-cl::opt<HelpPrinter, true, parser<bool> >
+static cl::opt<HelpPrinter, true, parser<bool> >
HHOp("help-hidden", cl::desc("Display all available options"),
cl::location(HiddenPrinter), cl::Hidden, cl::ValueDisallowed);
-void (*OverrideVersionPrinter)() = 0;
+static void (*OverrideVersionPrinter)() = 0;
+namespace {
class VersionPrinter {
public:
void operator=(bool OptionWasSpecified) {
@@ -998,17 +1000,16 @@ public:
}
}
};
+} // End anonymous namespace
// Define the --version option that prints out the LLVM version for the tool
-VersionPrinter VersionPrinterInstance;
-cl::opt<VersionPrinter, true, parser<bool> >
+static VersionPrinter VersionPrinterInstance;
+
+static cl::opt<VersionPrinter, true, parser<bool> >
VersOp("version", cl::desc("Display the version of this program"),
cl::location(VersionPrinterInstance), cl::ValueDisallowed);
-
-} // End anonymous namespace
-
// Utility function for printing the help message.
void cl::PrintHelpMessage() {
// This looks weird, but it actually prints the help message. The