Dan Gohman
2009-Aug-25 17:20 UTC
[LLVMdev] [API CHANGE (on trunk)] raw_fd_ostream defaults to overwrite
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. Dan
John Criswell
2009-Aug-25 17:43 UTC
[LLVMdev] [API CHANGE (on trunk)] raw_fd_ostream defaults to overwrite
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 >
Dan Gohman
2009-Aug-25 18:55 UTC
[LLVMdev] [API CHANGE (on trunk)] raw_fd_ostream defaults to overwrite
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
David Greene
2009-Aug-26 02:10 UTC
[LLVMdev] [API CHANGE (on trunk)] raw_fd_ostream defaults to overwrite
On Tuesday 25 August 2009 12:20, Dan Gohman wrote:> > Accompanying this is a change to the command-line tools. The tools > will now overwrite > their output files unconditionally, without needing the -f option.Halleluja! -Dave
Possibly Parallel Threads
- [LLVMdev] [API CHANGE (on trunk)] raw_fd_ostream defaults to overwrite
- [LLVMdev] std::cout << *MyModule does not work anymore
- [LLVMdev] LLVMContext: Suggestions for API Changes
- [LLVMdev] Different behavoir when writing to stdout with 2 raw_fd_ostreams with or w/o redirection
- [LLVMdev] Different behavoir when writing to stdout with 2 raw_fd_ostreams with or w/o redirection