PATCH: private ivars

Adrian Prantl aprantl at apple.com
Fri Feb 15 16:34:03 PST 2013


On Feb 15, 2013, at 4:16 PM, jahanian <fjahanian at apple.com> wrote:

> Few comments all related to all_declared_ivar_begin only.
> 
> There is only one implementation per class. Please do not mention "all implementations" in code comment.

Fixed, patch attached!
> Do not change the indentations. It has added to the diff making it harder to review.

I don't think I changed the indentation on its own, but I did move that block inside the 
  if (!data().IvarList) 
compound statement.

> Make sure this patch does not add same ivar to the list more than once if it is called for
> debug info. multiple times. Does you patch prevent that? (Note that we have ivars in primary class,
> in multiple class extensions and one class implementation). No matter how this routine is called per
> each top-level declaration, no duplicate ivar should be added to the list.

The first big block is only executed if data().IvarList is 0. If there is no implementation, the data().ivarListMissingImplementation flag is set. If there is an implementation, the ivars from that implementation will be added to the list and the flag is cleared. After that the cached ivarlist will always be returned. At least that's what I intended to write!

thanks,
Adrian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: private-ivars.patch
Type: application/octet-stream
Size: 7053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130215/71063aad/attachment.obj>


More information about the cfe-commits mailing list