[cfe-dev] Objective-C: methods, ivars, and cleanup
David Chisnall
theraven at sucs.org
Thu Apr 3 10:36:47 PDT 2008
There were two issues with the last ObjC CodeGen patch. This should
address one of them (assignment to self).
I have modified CodeGenFunction so that CurFuncDecl is now a Decl (not
a FunctionDecl) and stores either the FunctionDecl for C functions or
the ObjCMethodDecl for Objective-C methods. In future, it will
presumably store method decls for C++ methods as well. I have also
added dyn_casts wherever it is used (only in one place, at the moment)
to check it is the correct type. (Note: __func__ and friends do not
currently work correctly for Objective-C).
I have also added a LoadObjCSelf method which returns an llvm::Value
containing the current value of self. This is needed because self is
accessed from outside CodeGenFunction.
Modifying the value of self now works and both ivar accesses and
message sends use the correct one.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: objc_ivar.diff
Type: application/octet-stream
Size: 4889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080403/63baef33/attachment.obj>
More information about the cfe-dev
mailing list