[LLVMdev] LLVMContext: Suggestions for API Changes
Owen Anderson
resistor at mac.com
Wed Jul 15 09:00:03 PDT 2009
On Jul 15, 2009, at 7:44 AM, John Criswell wrote:
> 1) If technically possible, add the new API first, get it working,
> email
> llvmdev describing the old and new APIs, provide some lead time for
> people to change over, and then remove the old APIs. This makes it
> easier to plan when I fix problems due to LLVM API changes and when I
> can work on our own bugs. :)
The high-level change was already described and discussed on LLVMdev.
The summary is that the static factory methods on Constant and Type
are going away, and becoming instance methods on LLVMContext. All of
the instance methods are already in place (though many just forward to
the static implementations for the moment). I'm currently in the
process of moving the implementations over, removing the static
versions, and updating the LLVM tree for it.
For basic constant-fetching API changes, which make up the bulk of the
changes, the update should be trivial: switching to the corresponding
instance method on LLVMContext. In general, I've tried to make the
mapping of static function names to instance method names obvious, so
it should be straightforward.
Slightly more tricky are the API changes made incidentally to moving
to LLVMContext, like the GlobalValue constructor change. These
occurred because it was necessary to pass a context in where it wasn't
available before. I'll try to provide more notice about these, but,
again, they should be relatively limited in scope.
--Owen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090715/3a3b2b6c/attachment.bin>
More information about the llvm-dev
mailing list