Commit Graph

258 Commits

Author SHA1 Message Date
Doug Gregor
25c5692fe6 PrintAsObjC: Swift subobject initializers are ObjC designated initializers.
Swift SVN r14610
2014-03-03 21:38:28 +00:00
Jordan Rose
4e72db0a94 [PrintAsObjC] Only @import frameworks that are used by the header.
Anything used only in an implementation should be omitted.

<rdar://problem/16140047>

Swift SVN r14485
2014-02-27 23:32:58 +00:00
Ted Kremenek
028f9d0561 Remove rest of Makefile build except for 'docs' and 'www'.
For 'docs' and 'www' it is possible these are still being used,
as they work independent of the Makefile build.  Keeping them for now.

Swift SVN r14418
2014-02-26 22:21:25 +00:00
Jordan Rose
b9cd3c1163 [Sema] Allow Optional and UncheckedOptional in @objc methods and properties.
...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
2014-02-26 22:15:55 +00:00
Jordan Rose
ffd104e3b0 [PrintAsObjC] Add objc_complete_definition attribute to generated @interfaces.
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
2014-02-26 22:15:48 +00:00
Jordan Rose
02892a0412 [PrintAsObjC] Handle UInt by printing it as NSUInteger.
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
2014-02-19 18:29:42 +00:00
Jordan Rose
7995dde448 Module::getImportedModules can now get public, private, or all imports.
...whereas before the only options were "public" and "all".

No functionality change.

Swift SVN r13849
2014-02-12 23:57:43 +00:00
Jordan Rose
95461797aa Move -print-as-objc feature into a library.
No functionality change.

Swift SVN r13798
2014-02-12 01:19:09 +00:00