[LLVMdev] MAJOR API CHANGE: LLVMContext
Samuel Crow
samuraileumas at yahoo.com
Tue Jun 30 17:47:52 PDT 2009
Hello Owen,
Is this effective immediately for the 2.6 Top of Tree or is it something that will change in the next release (eg. 2.7)?
Thanks,
--Sam
----- Original Message ----
> From: Owen Anderson <resistor at mac.com>
> To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
> Sent: Tuesday, June 30, 2009 7:14:03 PM
> Subject: Re: [LLVMdev] MAJOR API CHANGE: LLVMContext
>
> To ease this transition, I have added a getGlobalContext() API. If
> you're only ever planning to use LLVM on a single thread, it will be
> completely safe to simply pass this value to every API that takes an
> LLVMContext.
>
> --Owen
>
> On Jun 30, 2009, at 3:38 PM, Owen Anderson wrote:
>
> > Notice of a major upcoming API change: The static methods for
> > constructing types and constants will be going away in the future.
> > Instead, the global uniquing tables that lurk behind these APIs will
> > be privatized within LLVMContext instances.
> >
> > What this means for you: Your client application will need to create
> > an LLVMContext in main(), and pass it into a few APIs (the constructor
> > for Module, for instance). You can, in theory, have more than one
> > LLVMContext as long as you never want Modules created under separate
> > contexts to interact.
> >
> > In the near term, I will be committing patches to do this conversion
> > for the existing LLVM tools, including Clang and LLVM-GCC, which
> > should provide examples for those following along at home.
> >
> > --Owen
More information about the llvm-dev
mailing list