[LLVMdev] RFC: Constant Creation API
mainmanmauricio at gmail.com
Sat Jul 25 11:51:27 PDT 2009
On Sat, Jul 25, 2009 at 7:47 PM, Chris Lattner <clattner at apple.com> wrote:
> On Jul 25, 2009, at 5:44 AM, Maurice Gittens wrote:
> Assuming that I have a threaded JIT server which has an llvmContext object
> on the stack of every JITting thread in the server.
> When using the 2.5. API like:
> C = llvm::ConstantInt::get(llvm::Type::Int32Ty, 0);
> I need to assume that there exists some global llvmContext object which
> the predefined llvm types.
> Does this entail that in my threaded server I need to create new types for
> llvm::Type::Int32Ty and the like, which are associated with the
> llvm::Context on the stack?
> Yes, you'll have to write something like:
> C = llvm::ConstantInt::get(llvm::Type::getInt32Ty(Context), 0);
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev