Commit Graph

108 Commits

Author SHA1 Message Date
Jordan Rose
c6226159c5 Allow class properties to be @objc, and expose them as class methods.
<rdar://problem/17164696>

Swift SVN r19117
2014-06-24 01:23:02 +00:00
Chris Lattner
228389490f stop marking implicit decls as @objc if they lack the objc attribute. This
prevents synthesized stuff from being reflected back to the runtime, and prevents
PrintAsObjC from reflecting it into the generated ObjC header.

This fixes:
<rdar://problem/17165953> Swift: @lazy property reflects back into Objective-C with two properties, one for underlying storage

which caused us to print a decl for a lazy property's storage, which is useless
but also syntactically incorrect, causing clang to fail to parse the header.



Swift SVN r19054
2014-06-20 22:29:09 +00:00
Jordan Rose
03eacc2931 [PrintAsObjC] Forward-declare things for the generated header when possible...
...and just outright import the bridging header if that's what's needed.

This means we'll use @class and @protocol whenever we're just using a class
or protocol in a type, but still import the enclosing module when we need
the definition. We'll also fall back to the module (or bridging header) if
we need something /else/ from C: a struct, a typedef, whatever.

<rdar://problem/17183425>

Swift SVN r18795
2014-06-11 00:01:58 +00:00
Jordan Rose
6afb4df544 [PrintAsObjC] Handle properties with weak/unowned storage.
We don't do this quite as well as we could (we don't list the storage
type in the @property), but previously we just failed on these types.

<rdar://problem/16992990>

Swift SVN r18528
2014-05-21 22:38:04 +00:00
Joe Groff
e8f71c12a2 Rename ObjCMutablePointer to AutoreleasingUnsafePointer.
This relates its interface and behavior to that of UnsafePointer, and draws an analogy to '__autoreleasing *' in ARC.

Swift SVN r18236
2014-05-17 04:44:44 +00:00
Doug Gregor
ad18ed81fb Start importing NSArray* as (AnyObject[])! by default <rdar://problem/16535097>.
Swift SVN r18157
2014-05-16 01:10:13 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Jordan Rose
8b9dfb017a Move test/Swift2ObjC to test/PrintAsObjC to match the library name.
Swift SVN r13799
2014-02-12 01:19:12 +00:00