[cfe-commits] r71578 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp

Chris Lattner clattner at apple.com
Tue May 12 23:44:44 PDT 2009


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);

-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




More information about the cfe-commits mailing list