Commits

Joe Groff committed d91f78556a1
IRGen: Implement protocol typeof. Represent protocol 'P.metatype' types using the type metadata of the contained metatype. Emit 'typeof' value witnesses for protocol types that project the existential container buffer and then call the 'typeof' witness for the contained value. Implement the SIL protocol_metatype instruction the same way. You can't quite call static methods on protocols yet because protocol_method doesn't know how to look up static methods from an existential metatype yet. This breaks references to protocol names—they will try to create an existential metatype that refers to the metadata of the protocol type itself, rather than to the metadata of a conforming type. <rdar://problem/13438779> would fix them. Swift SVN r5033