[LLVMdev] RFC: Constant Creation API

Maurice Gittens mainmanmauricio at gmail.com
Fri Jul 24 05:16:49 PDT 2009


Yeah, for us who have already made the changes, this is kinda bitter sweet.

Maurice

On Fri, Jul 24, 2009 at 2:08 PM, Richard Pennington <rich at pennware.com>wrote:

> I hate to say it (because I already made the changes), but keeping
> compatibility with 2.5 is a good thing.
>
> -Rich
>
> Owen Anderson wrote:
> > So, as you all probably noticed, the APIs for creating constants have
> > been moved (or in a specific cases, are about to be moved) from static
> > methods on Constant to instance methods on LLVMContext.
> >
> > However, as was recently pointed out on llvm-commits and on IRC, this is
> > no longer strictly necessary.  Because types have contexts, all of the
> > constant subclasses could be friended to LLVMContext, and then put the
> > work of uniquing by accessing the context off of the type.
> >
> > There are obviously some pros and to both approaches.  Going back to the
> > old-style increases compatibility with 2.5, and breaks up the massive
> > LLVMContext class.  On the downside, it would cause massive thrashing on
> > TOT, because I will have to revert about two weeks worth of commits in
> > widely dispersed parts of the tree, and because a number of clients have
> > already switched to the new TOT API.
> >
> > Any comments and/or opinions on this decision are welcome.
> >
> > --Owen
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090724/9d81df19/attachment.html>


More information about the llvm-dev mailing list