sunfish added a comment.
> In any case, that's not how clang deal with usage or even internal unexpected
> errors. It asserts, print error messages but does not crash on purpose.
> Having clang crash here does not seem like a good solution and will result in
> this issue continue to surface aga
ABataev added a comment.
The bad thing is that the same problem can be reproduced not only in frontend,
but also in opt tool. The test I wrote (test/Other/empty.ll) also failed with
the same message.
And Yaron is right, I need to mix several outputs in stdout. What should I do
in this case?
h
yaron.keren added a comment.
Hi Dan, it makes sense that output streams should not usually be mixed
together, especially if one is binary as you write.
This may or may not be a problem depending on what the user really wants. He
may want to mix the outputs for whatever purposes or it may usually
sunfish added a comment.
This code has been questioned in this way before, and every time it comes up,
it turns out that there's a bug somewhere else that really ought to be fixed
anyway.
In previous iterations of this discussion, when clang is found attempting to
print something like a dep fi
ABataev updated the summary for this revision.
ABataev updated this revision to Diff 35698.
ABataev added a comment.
Reworked patch after some discussion
http://reviews.llvm.org/D13128
Files:
lib/Support/raw_ostream.cpp
test/Other/empty.ll
Index: lib/Support/raw_ostream.cpp
===
yaron.keren added a subscriber: sunfish.
yaron.keren added a comment.
The original commit
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20100816/106268.html
by Dan Ghoman says:
"Make raw_fd_ostream consider itself the owner of STDOUT_FILENO when
constructed with an output filename of
ABataev added a comment.
In http://reviews.llvm.org/D13128#252630, @yaron.keren wrote:
> When stdout goes elsewhere the console, the shell creates the the output file
> (pipe) and will close it when clang terminates so so why clang should close
> it at all ? it did not open it.
>
> Practicall
yaron.keren added a subscriber: yaron.keren.
yaron.keren added a comment.
When stdout goes elsewhere the console, the shell creates the the output file
(pipe) and will close it when clang terminates so so why clang should close it
at all ? it did not open it.
Practically, we have been running