summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-11-16 06:50:36 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-11-16 06:50:36 +0000
commitf0173e0c48f4def2c7a794efe28ec1d10c272374 (patch)
treedcfad8bbf18943284417c83c5031363116d171df /llvm/lib
parent5208a114407336250527b0c7b370fec18c2e2dbf (diff)
downloadbcm5719-llvm-f0173e0c48f4def2c7a794efe28ec1d10c272374.tar.gz
bcm5719-llvm-f0173e0c48f4def2c7a794efe28ec1d10c272374.zip
Add a comment to some code that at first glance just doesn't look right.
llvm-svn: 17886
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/CommandLine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 15fd19591a0..df321653e6d 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -972,5 +972,11 @@ VersOp("version", cl::desc("display the version"),
// Utility function for printing the help message.
void cl::PrintHelpMessage() {
+ // This looks weird, but it actually prints the help message. The
+ // NormalPrinter variable is a HelpPrinter and the help gets printed when
+ // its operator= is invoked. That's because the "normal" usages of the
+ // help printer is to be assigned true/false depending on whether the
+ // --help option was given or not. Since we're circumventing that we have
+ // to make it look like --help was given, so we assign true.
NormalPrinter = true;
}
OpenPOWER on IntegriCloud