Generate ObjC code using LLVM
I h开发者_如何学JAVAave been reading this article on implementing fast forwarding in Objective C using LLVM and had an idea for doing something similar. Is it possible to generate Objective C code to extend an existing class using LLVM? I have a class definition. Now I want to add a new message to that class using LLVM. Would that be possible?
Well, you can do this with the Runtime library, add methods etc....Runtime Reference
Look at...
BOOL class_addMethod(Class cls, SEL name, IMP imp, const char *types)
精彩评论