[LLVMdev] raw_ostream behavior

Reid Kleckner rnk at google.com
Wed Aug 14 15:22:17 PDT 2013


On Wed, Aug 14, 2013 at 3:16 PM, Nick Kledzik <kledzik at apple.com> wrote:

> On Aug 14, 2013, at 3:00 PM, Dan Gohman <dan433584 at gmail.com> wrote:
>
> Standard error is what many tools, including clang for example, use for
> their --verbose output. This is appropriate because it leaves standard
> output available for regular output data, which the user may wish to
> capture in a file or a pipe.
>
> Well, at least with the darwin linker, the linker main output goes to a
> file (specified by -o or “a.out”). So, since there is normally nothing
> going to stdout, -v and -t output goes to stdout.
>
> Shankar, although not quite as convenient, we could change the core linker
> test cases from:
>       lld … | FileCheck
> to:
>      lld …  -o %t && FileCheck < %t
> Then change the core linker to not use “-“, but error if -o is not
> supplied.
>

It's a very common lit test pattern to do 'clang/llc %s ... -o - |
FileCheck %s ', and lld should probably support that.  It should be just a
matter of avoiding outs().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130814/818bcda6/attachment.html>


More information about the llvm-dev mailing list