[LLVMdev] std::cout << *MyModule does not work anymore

Albert Graef Dr.Graef at t-online.de
Tue Aug 25 23:34:21 PDT 2009


Chris Lattner wrote:
> Given that we don't guarantee backwards compatibility and prefer to keep
> our APIs clean and tidy, why should we take this?

I already said that: To make it easier for out-of-tree frontends to
support at least the last few LLVM versions. If that's a low priority
then don't. I can live with it.

Please understand that I don't complain about API breakage in general.
It was certainly necessary to implement the multithreading support and
some other stuff in 2.6, and in any case it's a good thing that LLVM
develops new functionality so fast.

In this specific case, however, I think that the API breakage was
completely unneccessary and could have easily been avoided right from
the beginning. In fact, you could have just taken the LLVM 2.5
raw_fd_ostream constructor, turned the 'bool Binary' into an 'unsigned
flags' (with F_Binary=1 for backward compatibility, other flags added as
needed) and old code would have just continued to work and new code
would have been happy, too. But that's not what happened. Instead we now
have a mess of three different raw_fd_ostream interfaces with almost
identical functionality in three consecutive LLVM versions. My patch
just tries to correct this as good as possible given that the API was
already changed in an incompatible way.

Well, that's my take on it. At least I tried. :)

Albert


-- 
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de
WWW:    http://www.musikinformatik.uni-mainz.de/ag



More information about the llvm-dev mailing list