Commits

Jordan Rose committed 53118e9a5f9
Split the "Foreign" flag into a ForeignKind enum. This flag tracks whether we have a special kind of imported class that has limitations in what you can do with it. Currently it's used for two things: CF classes, and the magic "Protocol" class used to represent Objective-C protocol metadata. I'm planning to add a third to handle classes with the recently-added objc_runtime_visible attribute, which describes an Objective-C class whose runtime symbols are hidden (forcibly preventing categories and subclassing). This is used for some of the types in Dispatch, which has exposed some of the classes that were considered implementation details on past OSs. I'm splitting the flag into an enum rather than just marking the Dispatch classes with the existing flag because we still need to be able to /cast/ to the Dispatch types (which you can't do with CF types today) and because they deserve better than to be lumped in with CF for diagnostic purposes. Groundwork for rdar://problem/26850367, which is that Swift will happily let you extend the new Dispatch classes but then fails to find the symbols at link-time.