diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-12 22:09:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-12 22:09:17 +0000 |
commit | adb19d6e8f1daa64bd04485c464e28a1c2171f08 (patch) | |
tree | 1bf373bcde76e987e7213017ce16e2bcc5abcdee /llvm/lib/Support/CommandLine.cpp | |
parent | 03fda13dbbdf5be8921c6eab72b43ee961a4bffd (diff) | |
download | bcm5719-llvm-adb19d6e8f1daa64bd04485c464e28a1c2171f08.tar.gz bcm5719-llvm-adb19d6e8f1daa64bd04485c464e28a1c2171f08.zip |
shrink anon-ns and mark stuff static. No functionality changes
llvm-svn: 30922
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 4a3ccfaa070..cd903126f5b 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/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 |