diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-11-16 06:50:36 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-11-16 06:50:36 +0000 |
commit | f0173e0c48f4def2c7a794efe28ec1d10c272374 (patch) | |
tree | dcfad8bbf18943284417c83c5031363116d171df /llvm/lib | |
parent | 5208a114407336250527b0c7b370fec18c2e2dbf (diff) | |
download | bcm5719-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.cpp | 6 |
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; } |