[llvm-commits] CommandLine.html patch

Sam Bishop sam at bishop.dhs.org
Wed Jan 9 09:34:00 PST 2008


I've attached a patch which fixes a few punctuation errors and typos in the
CommandLine class documentation.  (Thanks for the documentation, by the
way!)

Also, I was confused by one of the examples regarding the handling of
program-wide global options such as a debug flag.  "DebugFlag" is the global
variable set by the parser; the following is given as an example of how you
would use it:

// DEBUG macro - This macro should be used by code to emit debug information.
// In the '-debug' option is specified on the command line, and if this is a
// debug build, then the code specified as the option to the macro will be
// executed.  Otherwise it will not be.  Example:
//
// DOUT << "Bitset contains: " << Bitset << "\n";
//
#ifdef NDEBUG
#define DEBUG(X)
#else
#define DEBUG(X) do { if (DebugFlag) { X; } } while (0)
#endif

I'm very new to LLVM, so I can only guess at how DOUT is related to DEBUG().
 Is there another example that would be more straightforward?

Thanks,
Sam Bishop
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CommandLine.html.patch
Type: application/octet-stream
Size: 11964 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080109/0acdf19f/attachment.obj>


More information about the llvm-commits mailing list