[cfe-commits] r71578 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Fariborz Jahanian
fjahanian at apple.com
Wed May 13 09:20:36 PDT 2009
On May 12, 2009, at 11:44 PM, Chris Lattner wrote:
> On May 12, 2009, at 1:06 PM, Fariborz Jahanian wrote:
>> URL: http://llvm.org/viewvc/llvm-project?rev=71578&view=rev
>> Log:
>> Fixed typos, used DenseSet for keeping track of
>> selectors which need use Nonfrgile API for
>> message dispatch.
>
> Thanks Fariborz, one more minor thing:
>
>> + NonLegacyDispatchMethods.insert(GetUnarySelector("isEqual"));
>> + NonLegacyDispatchMethods.insert(GetUnarySelector("addObject"));
>> + // "countByEnumeratingWithState:objects:count" auch!
>
> auch?
>
>>
>> + llvm::SmallVector<IdentifierInfo *, 4> KeyIdents;
>> + KeyIdents.push_back(
>> +
>> &CGM.getContext().Idents.get("countByEnumeratingWithState"));
>> + KeyIdents.push_back(&CGM.getContext().Idents.get("objects"));
>> + KeyIdents.push_back(&CGM.getContext().Idents.get("count"));
>> +
>> NonLegacyDispatchMethods
>> .insert(CGM.getContext().Selectors.getSelector(
>> + 3,
>> &KeyIdents[0]));
>
>
> This can use a simple C array like this:
>
> IdentifierInfo *KeyIdents[] = {
> &CGM.getContext().Idents.get("countByEnumeratingWithState"),
> &CGM.getContext().Idents.get("objects"),
> &CGM.getContext().Idents.get("count")
> };
>
> .. getSelector(3, KeyIdents);
Thanks for the review. Done in: http://llvm.org/viewvc/llvm-project?rev=71674&view=rev
- Fariborz
>
>
> -Chris
>
>
>>
>> + }
>> + return (NonLegacyDispatchMethods.count(Sel) == 0);
>> }
>>
>> // Metadata flags
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090513/a7ed0550/attachment.html>
More information about the cfe-commits
mailing list