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 file to the same stream as the normal compiler 
output file, this is not actually desirable behavior because it mixes two 
different kinds of output. Besides the fact that this typically isn't what a 
user actually wants, it can cause serious problems if one of the stream needs 
to use "binary" mode and the other doesn't, for example.

The resolution has been to have clang issue an error if the dep file and the 
output file are both using stdout, which is nice to do, because if a user is 
asking for this it's likely not intentional. With this done, there is no longer 
a way to crash the compiler, and there's no need to change how raw_fd_ostream 
works.


http://reviews.llvm.org/D13128



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to