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

Chris Lattner clattner at apple.com
Wed Aug 26 13:20:13 PDT 2009


On Aug 25, 2009, at 11:34 PM, Albert Graef wrote:

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

I don't understand how that can be.  We have made *many dramatic API  
changes* in those releases, surely this isn't the only problem you  
have hit.  Are you using the C++ APIs?  We try to keep the C apis as  
stable as possible, is it possible to use those?

Just to be clear, I'm not trying to be a butthead about this :).  I  
just see that API stability in almost a binary way: you either try to  
keep it or not.  If not, I don't think that trying to paper over small  
changes like this is worth it.

>  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

Sure, but again, the change wasn't made for an arbitrary reason:  
moving them to the end allows them to be optional, so that they do not  
need to be specified.  This makes the API more elegant.  I'm not  
willing to sacrifice small bits of API elegance unless we actually get  
something useful out of this.  Given the other massive and widespread  
api changes in 2.6, I can't fathom how this can actually matter.

-Chris



More information about the llvm-dev mailing list