On Jan 9, 2008 9:34 AM, Sam Bishop <[EMAIL PROTECTED]> wrote: > 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? > DOUT is documented here:
http://llvm.org/docs/CodingStandards.html#ll_iostream Though you're right that this example is misplaced. -bw _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits