[LLVMdev] [API CHANGE (on trunk)] raw_fd_ostream defaults to overwrite
Dan Gohman
gohman at apple.com
Tue Aug 25 11:55:02 PDT 2009
On Aug 25, 2009, at 10:43 AM, John Criswell wrote:
> Dan Gohman wrote:
>
>> Hello,
>>
>>
>>
>> The following describes an API change on trunk. The change is not in
>>
>> the 2.6 branch.
>>
>>
>>
>> The raw_fd_ostream class now defaults to overwriting its output file,
>>
>> and the
>>
>> F_Force flag which was introduced only recently is gone. There's a
>>
>> new F_Excl flag to
>>
>> support users wanting the behavior of returning an error if the file
>>
>> exists, though no one
>>
>> actually appears to want this.
>>
>>
>>
>> Accompanying this is a change to the command-line tools. The tools
>>
>> will now overwrite
>>
>> their output files unconditionally, without needing the -f option.
>>
>>
>>
> Do the command line options still support the presence of -f for
> backwards compatibility? I'm not too keen on changing years worth of
> Makefiles and scripts because people want raw_fd_ostream to exhibit
> different behavior. I could care less what raw_fd_ostream does, but
> in
> my opinion, options to core LLVM commands should not be removed unless
> they are obscure (i.e., nobody ever used them).
Yes, my change left the -f option in all the tools that had it,
including those where it no longer has any effect.
>
> Also, have you considered the potential impact of the command line
> option change? Users may have written scripts or Makefiles that
> depend
> on the fact that files do not get overwritten unless the -f option is
> specified; changing the behavior may break those scripts/Makefiles.
Such scripts/Makefiles will have to be updated. I expect this to be
rare.
Dan
More information about the llvm-dev
mailing list