Commit Graph

114 Commits

Author SHA1 Message Date
Doug Gregor
9e2b68c4f9 Introduce CGFloat as a distinct struct type.
CGFloat is 32-bit on 32-bit architectures and 64-bit on 64-bit
architectures for historical reasons. Rather than having it alias
either Float (32-bit) or Double (64-bit), introduce a distinct struct
type for CGFloat. CGFloat provides a complete set of comparisons and
arithmetic operators (including tgmath functions), initializers allows
explicit conversion between it an Int, UInt, Float, and Double, as
well as conforming to all of the protocols that Float/Double do.

This formulation of CGFloat makes use of CGFloat
architecture-independent, although it still requires a number of casts.
Fixes <rdar://problem/17224725>

Swift SVN r19689
2014-07-08 19:00:18 +00:00
Jordan Rose
e9f6fba434 Update tests for memberwise accessibility.
Swift SVN r19354
2014-06-30 18:50:51 +00:00
Chris Lattner
f241c66cd7 implement <rdar://problem/17473876> @IBOutlet attribute shouldn't make properties implicitly optional or weak
Now the @IBOutlet attribute has no implicit effect on the type or storage of a property.  It still performs
validity checks of course.


Swift SVN r19344
2014-06-30 15:54:24 +00:00
Joe Groff
17d27e6529 PrintAsObjC: Print ConstUnsafePointer as a const pointer.
Swift SVN r19266
2014-06-26 22:37:25 +00:00
Doug Gregor
e064416c8f Update the rest of the testsuite for the array syntax change.
Swift SVN r19223
2014-06-26 05:39:25 +00:00
Jordan Rose
7fc8ecd919 [PrintAsObjC] Mark String, Array, and Dictionary properties as 'copy'.
<rdar://problem/17012159>

Swift SVN r19118
2014-06-24 01:23:03 +00:00
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