diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-11-16 06:11:52 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-11-16 06:11:52 +0000 |
commit | 5e5547045ba347e8c4e7b327ebd402ab6b0e3497 (patch) | |
tree | 54d8716fbd0f9171fe303872c3b437470c3d0b99 /llvm/include/llvm/Support/CommandLine.h | |
parent | f242979cd0b57a0ba03f069f649b8a653c12ebdc (diff) | |
download | bcm5719-llvm-5e5547045ba347e8c4e7b327ebd402ab6b0e3497.tar.gz bcm5719-llvm-5e5547045ba347e8c4e7b327ebd402ab6b0e3497.zip |
Per code review:
*Implement/Document the cl::extrahelp feature instead of the MoreHelp ptr.
llvm-svn: 17871
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r-- | llvm/include/llvm/Support/CommandLine.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index 4d5dccd38c0..3b4eda587aa 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/include/llvm/Support/CommandLine.h @@ -1046,13 +1046,19 @@ struct aliasopt { void apply(alias &A) const { A.setAliasFor(Opt); } }; -/// Permit the tool to provide additional help output after the normal -/// help output. To use this, create a function that returns void and -/// takes no arguments. Assign its address to cl::MoreHelp. If set, -/// this function will be called just before the CommandLine exits -/// after printing the help. -/// @brief Optional pointer to additional help function -extern void (*MoreHelp)(); +// extrahelp - provide additional help at the end of the normal help +// output. All occurrences of cl::extrahelp will be accumulated and +// printed to std::cerr at the end of the regular help, just before +// exit is called. +struct extrahelp { + const char * morehelp; + extrahelp(const char* help); +}; + +// This function just prints the help message, exactly the same way as if the +// --help option had been given on the command line. +// NOTE: THIS FUNCTION TERMINATES THE PROGRAM! +void PrintHelpMessage(); } // End namespace cl |