This is the same as the previous commit, but for protocols. To do this I
had to modify the ObjC printer to include a SWIFT_PROTOCOL annotation like
the SWIFT_CLASS annotation already in use. This is probably a good thing
anyway.
Second half of <rdar://problem/16296027>
Swift SVN r14985
This means more duplication, but it's also more future-proof: the set of
features used is based on the compiler that generates the header, not the
compiler that eventually consumes the header. To allow for forward-
compatibility, all the macros used by the header can be overridden by the
consuming environment, and the header <swift/objc-prologue.h> will be
included if it exists.
Swift SVN r14893
...when the optional object type is a class or Objective-C protocol type.
This is currently hidden behind -enable-objc-optional because I didn't test
if the generated code is actually correct.
Also add PrintAsObjC support for these.
Known missing pieces: blocks, and Swift structs bridged to Objective-C classes
(right now, just String).
Swift SVN r14416
This is using the compatibility macro SWIFT_CLASS, so older Clangs can still
parse a generated header on its own. This will only be interesting in a
mixed-source target, where we may need to merge a forward declaration with
a Swift-generated @interface. (See <rdar://problem/16076729>.)
Swift SVN r14411
This is a bit ironic considering we're importing NSUInteger as Int rather
than UInt, but Swift should never be using the headers it prints anyway.
Swift SVN r14088