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.
David
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.
>
> Thanks!
>
> --
> Rick
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev