[LLVMdev] [API CHANGE (on trunk)] raw_fd_ostream defaults to overwrite

John Criswell criswell at cs.uiuc.edu
Tue Aug 25 10:43:34 PDT 2009


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).

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.

-- John T.

> Dan
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>   




More information about the llvm-dev mailing list