[llvm-commits] CVS: llvm/lib/Support/CommandLine.cpp
Reid Spencer
reid at x10sys.com
Mon Nov 15 22:50:47 PST 2004
Changes in directory llvm/lib/Support:
CommandLine.cpp updated: 1.53 -> 1.54
---
Log message:
Add a comment to some code that at first glance just doesn't look right.
---
Diffs of the changes: (+6 -0)
Index: llvm/lib/Support/CommandLine.cpp
diff -u llvm/lib/Support/CommandLine.cpp:1.53 llvm/lib/Support/CommandLine.cpp:1.54
--- llvm/lib/Support/CommandLine.cpp:1.53 Tue Nov 16 00:11:52 2004
+++ llvm/lib/Support/CommandLine.cpp Tue Nov 16 00:50:36 2004
@@ -972,5 +972,11 @@
// 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;
}
More information about the llvm-commits
mailing list