What replaced the old DOUT? I'm working on sending debug code upstream and one of the things I want to add is circular buffering for debug output. This is a real help when processing large files. So I need a stream that can act differently than errs(). Should I just create one? -Dave
On Thu, Dec 10, 2009 at 1:22 PM, David Greene <dag at cray.com> wrote:> What replaced the old DOUT?DEBUG({ errs() << ...; ); - Daniel> I'm working on sending debug code upstream and one of the things I > want to add is circular buffering for debug output. This is a real > help when processing large files. > > So I need a stream that can act differently than errs(). Should I just > create one? > > -Dave > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
On Thursday 10 December 2009 16:30, Anton Korobeynikov wrote:> Hello, David > > > What replaced the old DOUT? > > DEBUG(errs() << foo); > > The reason is quite simple - DOUT in release mode was just /dev/null, > but the functions sending data to it were still called.errs() is no good. I would want to keep errs() printing things out immediately. I need something else that buffers until program termination. So I would write the above as: DEBUG(dbgs() << foo); Does that sound reasonable? There are some tricky cases where dump routines are used either to print error messages or to print debug information. In those cases I may have to parameterize the dump routine with the stream. -Dave
Hello, David> What replaced the old DOUT?DEBUG(errs() << foo); The reason is quite simple - DOUT in release mode was just /dev/null, but the functions sending data to it were still called. -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.