aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
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
commit5cc498f116cd76235c9c0a2ded46bc29f8fb35e0 (patch)
treeadd9482ad0a8e4cc046dcad457a3a0ee93d31924 /lib/Support
parent99d3604acf7eaa2ce11b29fc5a005047148cc9d9 (diff)
downloadexternal_llvm-5cc498f116cd76235c9c0a2ded46bc29f8fb35e0.zip
external_llvm-5cc498f116cd76235c9c0a2ded46bc29f8fb35e0.tar.gz
external_llvm-5cc498f116cd76235c9c0a2ded46bc29f8fb35e0.tar.bz2
Add a comment to some code that at first glance just doesn't look right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/CommandLine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 15fd195..df32165 100644
--- a/lib/Support/CommandLine.cpp
+++ b/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;
}