[LLVMdev] Examples of creating Obj-C objects?
dc552 at cam.ac.uk
Tue Jan 8 00:00:07 PST 2013
Which Objective-C runtime are you looking at? Clang currently supports the two Apple ABIs, the GCC and the GNUstep runtime. Take a look in CGObjCGNU.cpp and CGObjCMac.cpp.
If you're only interested in JIT compiling, then I would suggest that you look at the runtime's public API, and just use objc_msgSend() and friends to create objects. If you want to create classes, then use objc_createClassPair() and associated functions - you can do this outside of LLVM to create the class skeletons and then JIT-compile the methods with LLVM and attach them to the class, which will mean that your code is portable to all Objective-C implementations.
On 8 Jan 2013, at 03:18, Rick Mann wrote:
> Hi. Does anyone have examples of LLVM assembler to create Objective-C objects and send messages? I'm talking about having an Engine hosted within my Objective-C app, and having LLVM bitcode call back into the app.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev