[llvm-commits] [llvm] r111643 - /llvm/trunk/lib/Support/raw_ostream.cpp
Chris Lattner
clattner at apple.com
Sat Aug 21 15:31:47 PDT 2010
On Aug 20, 2010, at 8:07 PM, Dan Gohman wrote:
>
> On Aug 20, 2010, at 5:45 PM, Chris Lattner wrote:
>
>>
>> On Aug 20, 2010, at 9:44 AM, Dan Gohman wrote:
>>
>>> Author: djg
>>> Date: Fri Aug 20 11:44:56 2010
>>> New Revision: 111643
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=111643&view=rev
>>> Log:
>>> Make outs() close its file when its stream is destructed, so that
>>> pending output errors are detected.
>>
>> I don't get this. This means that any evaluation (e.g. in a library) of outs() will dramatically change the behavior of the program it is embedded into. This is non-obvious and seems really really dangerous.
>
> Library code meant to be embedded as a subsystem within diverse applications shouldn't
> ever be even thinking about outs(). There are a few legitimate outs() uses left in
> the tools right now, but due to the potential for confusion, it may make sense to
> remove outs() altogether.
Sounds good to me, so long as raw_fd_ostream has sensible behavior when talking to "-".
-Chris
More information about the llvm-commits
mailing list