[llvm-commits] [LLVMdev] [PATCH] Allow per-thread re-direction of outs()/errs()

Caldarale, Charles R Chuck.Caldarale at unisys.com
Fri Jun 1 19:08:31 PDT 2012


> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Chris Lattner
> Subject: Re: [LLVMdev] [llvm-commits] [PATCH] Allow per-thread re-direction of outs()/errs()

> It would be much better for the linker to return its error in a proper way
> (i.e. extending llvm/Support/system_error.h like llvm/Object/Error.h does).

> The right fix for this is to fix the code to not report errors textually.

Unfortunately, the use of outs() and (especially) errs() is rampant - a simple grep of the 3.1 source tree shows about 1,500 instances.  One of the first things we had to implement in order to make LLVM usable is something very similar to what Justin has proposed.  Centralizing control of the output in outs()/errs() would seem to be an ideal way to let users of LLVM as a library customize it as they see fit without requiring massive source changes.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.





More information about the llvm-commits mailing list