[LLVMdev] LLVMContext: Suggestions for API Changes

John Criswell criswell at cs.uiuc.edu
Wed Jul 15 07:44:16 PDT 2009

Dear LLVMers,

LLVM is currently undergoing a change in its programming API, most of
which has to do with the transition to using an LLVMContext.  I've been
trying to keep two LLVM projects, poolalloc and SAFECode, up-to-date
with LLVM mainline, but it has become frustrating because:

1) The API changes occur frequently.  Each morning I come in and have to
fix something because the API changed.

2) The necessary changes aren't advertised on llvmdev; I have to go
figure out for myself the new way to do whatever it is that my code does
(adding constant NULL pointers, adding constant integers, etc.).

When making API changes, could you please consider doing the following:

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

2) When an API change is going to be made/has been made, please send a
short email to llvmdev stating what has/will be changed and how LLVM
users should update their code.  If you can write a script that makes
the change automatically, that would be even better, but I realize that
some changes are complicated enough that automating the change is too
much effort.  It saves time when I know what is going to break and how
to fix it; scrounging around the LLVM source and the commit mailing list
is wasted time when a two sentence email will tell me everything I need
to know.

-- John T.

More information about the llvm-dev mailing list