Commit Graph

1102 Commits

Author SHA1 Message Date
Doug Gregor
186fe53f74 Eliminate the NSError -> error enum bridging from Contacts.
CNErrorDomain is lacking proper availability annotations, and
explicitly linking with -weak_framework is not working reliably. For
now, just remove the overlay to solve rdar://problem/21030937. We'll
bring it back when rdar://problem/21032649 makes it into all of the
builds we care about.

Swift SVN r29003
2015-05-25 04:47:15 +00:00
Ted Kremenek
a2c4ea971f Revert "Foundation overlay: add overlays for new NSString APIs"
Revert until our Jenkins devices support the underlying NSString API.  Keeping
this blocks iOS testing.

Swift SVN r28987
2015-05-24 16:55:25 +00:00
Dmitri Hrybenko
d45413efb8 Foundation overlay: add overlays for new NSString APIs
Swift SVN r28984
2015-05-24 10:39:21 +00:00
Doug Gregor
d1c25ddeb9 Add missing dependency: XCTest depends on AppKit or UIKit.
Swift SVN r28947
2015-05-23 03:40:35 +00:00
Ted Kremenek
f750954a53 Make scalar arguments to SIMD vector initializers anonymous.
Patch by Steve Canon.

Swift SVN r28932
2015-05-22 20:39:28 +00:00
Joe Groff
72d82d1808 Darwin/Glibc overlays: Conditionalize SIG_* tokens.
Darwin libc and glibc use different typedefs for the signal handler type, and SIG_HOLD has different values. Conditionalize the definitions in their respective overlays.

Swift SVN r28921
2015-05-22 17:02:00 +00:00
Joe Groff
db13a714ba Darwin overlay: Add SIG_* constants.
Swift SVN r28919
2015-05-22 15:04:50 +00:00
Joe Groff
32fb006386 Clang Importer: Enable OptionSetType import.
Update the tests to match.

Swift SVN r28906
2015-05-22 05:47:37 +00:00
Dmitri Hrybenko
2e67af546b Add the file I forgot to commit in r28833
Swift SVN r28837
2015-05-20 18:31:26 +00:00
Dmitri Hrybenko
3cc2161e6f SDK overlay: add generic API overlays for NSUndoManager
Patch by Michael J LeHew Jr.

Swift SVN r28833
2015-05-20 18:02:00 +00:00
Dmitri Hrybenko
8c41d4d4ca SDK overlay: actually request new APIs from CoreImage
Swift SVN r28831
2015-05-20 17:36:07 +00:00
Doug Gregor
077f3d3a36 WatchKit needs to be weak-linked due to missing availability info in the headers.
Swift SVN r28830
2015-05-20 17:25:08 +00:00
Dmitri Hrybenko
53f3ccf850 stdlib: change CollectionType.count() into a property
Swift SVN r28829
2015-05-20 09:14:43 +00:00
Doug Gregor
1ae67e338c Explicitly weak-link the Contacts framework into its overlay.
Fixes rdar://problem/21030937, which came about because CNErrorDomain
is missing availability information, so we generate a normal external
reference rather than a weak one.

Swift SVN r28824
2015-05-20 05:08:21 +00:00
Chris Lattner
66e1047b73 revert two changes I didn't intend.
Swift SVN r28805
2015-05-20 00:28:07 +00:00
Chris Lattner
20d161cfbf fix <rdar://problem/18123596> unexpected error on self. capture inside class method
We no do not require "self." for closures capturing self in static/class methods.
While we do actually capture the metatype more than we should (rdar://21030087),
this doesn't matter to the developer, since this capture cannot cause a cycle
in the reference graph that they should have to reason about.



Swift SVN r28804
2015-05-20 00:27:34 +00:00
Doug Gregor
36a0c434ea Generalize _BridgedNSError to RawRepresentable types with any integral RawValue.
Part of rdar://problem/20577517, which will depend on this protocol.

Swift SVN r28795
2015-05-19 22:40:15 +00:00
Doug Gregor
94aafe1f33 De-underscore _MachError, _POSIXError, _NSCocoaError, _NSURLError.
Turns rdar://problem/20536610 into API, per scattered but positive API
review feedback.

Swift SVN r28756
2015-05-19 05:53:36 +00:00
Doug Gregor
bddf134a87 Factor _NSCocoaError into a struct whose values are split across frameworks.
The Cocoa error domain is comprised on error codes from Foundation,
CoreData, and AppKit. Rather than try to collect all of the error
codes into a single enum in Foundation, use a struct that conforms to
ErrorType. Part of rdar://problem/20536610.

Swift SVN r28755
2015-05-19 05:53:34 +00:00
Dmitri Hrybenko
f37b768292 GameKit depends on SceneKit
Swift SVN r28746
2015-05-19 04:28:59 +00:00
Dmitri Hrybenko
4f13143919 Update SDK overlay for nullability annotations in the new SDK
Swift SVN r28739
2015-05-19 01:55:31 +00:00
Dmitri Hrybenko
abc7677337 GameplayKit overlay: adjust to SDK changes
Swift SVN r28738
2015-05-19 01:55:30 +00:00
Dmitri Hrybenko
7556a124f1 SpriteKit depends on AVFoundation
Swift SVN r28701
2015-05-18 08:00:56 +00:00
Dmitri Hrybenko
313701286b stdlib: Various punctuation and markup improvements to the comments.
Patch by Brian Lanier.

Swift SVN r28659
2015-05-16 03:04:51 +00:00
Dmitri Hrybenko
891ac31b43 Remove availability information from WatchKitErrorCode because
The SDK does not have it either, and the compiler does not handle
conditionally-available conformances.

Swift SVN r28657
2015-05-16 01:20:38 +00:00
Dmitri Hrybenko
6048306d3d Add availability information to the WatchKit overlay
Swift SVN r28656
2015-05-16 01:04:10 +00:00
Dmitri Hrybenko
a2096f187c Add the WatchKit overlay
rdar://20438380

Swift SVN r28654
2015-05-16 00:32:42 +00:00
Dmitri Hrybenko
8476af5582 Don't build SDK overlays for frameworks that don't exist on watchOS
Swift SVN r28644
2015-05-15 22:16:37 +00:00
Doug Gregor
1d6602ed73 Add bridging for the Mach error domain.
Swift SVN r28626
2015-05-15 16:53:29 +00:00
Doug Gregor
af6d4c5b6f Map the NSError POSIX domain into our error-handling scheme.
More of rdar://problem/20536610. _POSIXError is underscored because
this work needs to go to API review still.

Now with a proper build condition for _POSIXError on Darwin.

Swift SVN r28625
2015-05-15 16:22:20 +00:00
Ted Kremenek
2c3d0308a3 Revert "Map the NSError POSIX domain into our error-handling scheme."
This is breaking the bots.

Swift SVN r28615
2015-05-15 06:01:48 +00:00
Doug Gregor
1fa59f475a Map the NSError POSIX domain into our error-handling scheme.
More of rdar://problem/20536610. _POSIXError is underscored because
this work needs to go to API review still.

Swift SVN r28613
2015-05-15 05:31:25 +00:00
Dmitri Hrybenko
bb0ab47805 Add more missing dependencies for SDK overlays
Swift SVN r28612
2015-05-15 05:26:17 +00:00
Doug Gregor
c98995047f Add missing WebKit -> AppKit dependency.
Swift SVN r28609
2015-05-15 04:47:51 +00:00
Dmitri Hrybenko
7500da41c7 WatchKit depends on UIKit and CoreGraphics
Swift SVN r28608
2015-05-15 03:59:48 +00:00
Dmitri Hrybenko
d8d50e1815 stdlib: in Array bridging code, use the same pattern as Set and Dictionary use
Also, simplify the code by removing an unused parameter.  NFC.

Swift SVN r28607
2015-05-15 03:44:37 +00:00
Dmitri Hrybenko
db7857c5af GameKit depends on AppKit and UIKit
Swift SVN r28606
2015-05-15 03:37:44 +00:00
Dmitri Hrybenko
9c87e392e9 EventKit depends on AppKit
Swift SVN r28605
2015-05-15 03:27:55 +00:00
Dmitri Hrybenko
815816f4f7 Add more dependencies between SDK overlays
Swift SVN r28603
2015-05-15 02:02:08 +00:00
Dmitri Hrybenko
0d569c8e2d AVFoundation depends on CoreMedia
Swift SVN r28602
2015-05-15 01:50:49 +00:00
Dmitri Hrybenko
8d055ef793 CloudKit depends on CoreLocation
Swift SVN r28601
2015-05-15 01:50:49 +00:00
Dmitri Hrybenko
7c8a394cb1 Move NSObject extensions to the ObjectiveC overlay
NSObject is defined in the ObjectiveC module, not in Foundation.

rdar://20526438

Swift SVN r28591
2015-05-15 00:34:25 +00:00
Doug Gregor
d8d4e498a9 Correct target SDKs for new overlays introduced in r28585.
Swift SVN r28590
2015-05-14 23:21:32 +00:00
Doug Gregor
3561cfc8bd Bridge 15 NSError error domains into their corresponding enums.
Introduce a number of small overlays to bridge the NSError domains for
a number of frameworks into existing imported enums. This batch only
covers cases where there is an existing NS_ENUM describing the codes
for the domain, so we need only extend that enum to provide the
appropriate _BridgedNSError conformance.

This is the bulk of rdar://problem/20536610.

Swift SVN r28585
2015-05-14 22:34:29 +00:00
Doug Gregor
75f88af29a Make NSError error domain enums Equatable and Hashable.
Swift SVN r28568
2015-05-14 16:42:12 +00:00
Doug Gregor
7449c3b6ff Use protocol extensions to eliminate boilerplate in bridged NSError domains.
Swift SVN r28567
2015-05-14 16:42:10 +00:00
Joe Groff
9153e2261d CoreGraphics overlay: Comment that the @transparent definitions really want to be @fragile.
Swift SVN r28566
2015-05-14 15:59:28 +00:00
Doug Gregor
79e93e358c Add _NSURLError enum to cover the NSURLError error domain.
Swift SVN r28564
2015-05-14 06:53:55 +00:00
Doug Gregor
88b679969c Get availability annotations right for NSCocoaError.
Fix the script to not wantonly drop availability annotations, and
update NSCocoError accordingly. Also drop in a reinterpret-casting
rawValue initializer, which matches what we get when importing enums
from C.

Swift SVN r28563
2015-05-14 06:53:52 +00:00
Doug Gregor
cfbe2e0921 Hard-code the Cocoa error domain mapping using the results of a simple script.
Bridging the Cocoa error domain requires us to gather constants from
Foundation, CoreData, and AppKit, then pulling those into a single
(_)NSCocoaError enum that conforms to
_ObjectiveCBridgeableErrorType.

Rather than using a table extracted from the appropriate Cocoa headers
and pushing that through gyb, just hardcode the resuting Swift code,
which is produced (manually) by an enumeration-parsing script. Thanks
to Dave for pointing out that I was holding gyb wrong.

... and apologies for the Perl.

Long term, we need a better solution here, but this will suffice for
the short term.

Swift SVN r28560
2015-05-14 05:39:45 +00:00