shrink anon-ns and mark stuff static. No functionality changes

llvm-svn: 30922
This commit is contained in:
Chris Lattner 2006-10-12 22:09:17 +00:00
parent 03fda13dbb
commit adb19d6e8f
1 changed files with 11 additions and 10 deletions

View File

@ -952,23 +952,25 @@ public:
exit(1); exit(1);
} }
}; };
} // End anonymous namespace
// Define the two HelpPrinter instances that are used to print out help, or // Define the two HelpPrinter instances that are used to print out help, or
// help-hidden... // help-hidden...
// //
HelpPrinter NormalPrinter(false); static HelpPrinter NormalPrinter(false);
HelpPrinter HiddenPrinter(true); 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)"), HOp("help", cl::desc("Display available options (--help-hidden for more)"),
cl::location(NormalPrinter), cl::ValueDisallowed); 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"), HHOp("help-hidden", cl::desc("Display all available options"),
cl::location(HiddenPrinter), cl::Hidden, cl::ValueDisallowed); cl::location(HiddenPrinter), cl::Hidden, cl::ValueDisallowed);
void (*OverrideVersionPrinter)() = 0; static void (*OverrideVersionPrinter)() = 0;
namespace {
class VersionPrinter { class VersionPrinter {
public: public:
void operator=(bool OptionWasSpecified) { 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 // Define the --version option that prints out the LLVM version for the tool
VersionPrinter VersionPrinterInstance; static VersionPrinter VersionPrinterInstance;
cl::opt<VersionPrinter, true, parser<bool> >
static cl::opt<VersionPrinter, true, parser<bool> >
VersOp("version", cl::desc("Display the version of this program"), VersOp("version", cl::desc("Display the version of this program"),
cl::location(VersionPrinterInstance), cl::ValueDisallowed); cl::location(VersionPrinterInstance), cl::ValueDisallowed);
} // End anonymous namespace
// Utility function for printing the help message. // Utility function for printing the help message.
void cl::PrintHelpMessage() { void cl::PrintHelpMessage() {
// This looks weird, but it actually prints the help message. The // This looks weird, but it actually prints the help message. The