Commit Graph

4 Commits

Author SHA1 Message Date
John McCall da518417fa Permit template argument deduction to add qualifiers within ObjC object
pointers like it can with normal and member pointers.

llvm-svn: 110313
2010-08-05 05:30:45 +00:00
John McCall 8b07ec253d Substantially alter the design of the Objective C type AST by introducing
ObjCObjectType, which is basically just a pair of
  one of {primitive-id, primitive-Class, user-defined @class}
with
  a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared).  ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.

Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType.  Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet.  Remove some number of methods that are no
longer used, at least after this patch.

By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.

llvm-svn: 103870
2010-05-15 11:32:37 +00:00
John McCall 01f21ad97c Rebuild builtin_id * as an ObjCObjectPointerType, where builtin_id is the
magic type that 'id' is a pointer to.

llvm-svn: 103708
2010-05-13 08:39:13 +00:00
John McCall bb4ea81ab9 When performing template argument deduction, match Objective C pointers
against pointer patterns.

llvm-svn: 103706
2010-05-13 07:48:05 +00:00