Commit Graph

12 Commits

Author SHA1 Message Date
Karoy Lorentey
0344f0830e Merge branch 'master' into foundation-no-inlinable-shim-calls 2020-03-31 18:24:59 -07:00
Xiaodi Wu
1d7ec4c129 [NFC][Foundation] Remove or replace unnecessary uses of 'fileprivate' 2020-02-23 13:45:13 -05:00
Karoy Lorentey
c9058f0946 [Foundation] Switch to private imports of Foundation shims 2019-12-20 20:50:18 -08:00
Luciano Almeida
392baefc47 [stdlib][Qol] SR-11295 Removing stdlib unnecessary coercions (#27165)
* Removing unnecessary casts from stdlib

* Minor adjustments

* [stdlib][qol] Clean up error variable assign NSError

* Removing unnecessary coercions after removing DeclRefExpr restriction.
2019-12-11 07:30:25 -08:00
David Smith
5e83f80d6f Let NSMutableDictionary check for -copy on keys, rather than doing it ourselves with a full (slow) conformance check 2019-07-17 15:50:03 -07:00
Karoy Lorentey
3c74c0f1cb [stdlib] Change the signature of Dictionary’s bulk initializer (#23758)
The initializer was originally introduced without proper availability; in https://github.com/apple/swift/pull/23643, we fixed this by applying the `@_alwaysEmitIntoClient` attribute. However, this had the unfortunate side-effect that the symbol disappeared from `libswiftCore.dylib`, which somehow confuses some simulator builds.

Try to figure out what’s happening by replacing the third closure argument with an integer return value. This changes the mangled name of the bulk initializer, which should make it more obvious how/why these builds fail.

rdar://problem/49479386
2019-04-03 10:51:36 -07:00
Karoy Lorentey
300595eed4 [Foundation] Collapse as AnyObject as! Foo cast sequences 2019-03-15 13:26:58 -07:00
Karoy Lorentey
5b9ab59515 [Foundation] NSSet, NSDictionary: Use as! casts to force-bridge elements
This traps with a clear runtime error on failure, rather than simply crashing in the runtime.
2019-03-07 19:57:13 -08:00
Mike Ash
fa5888fb3f [Stdlib][Overlays] Rename various classes to avoid conflicting ObjC names.
Old Swift and new Swift runtimes and overlays need to coexist in the same process. This means there must not be any classes which have the same ObjC runtime name in old and new, because the ObjC runtime doesn't like name collisions.

When possible without breaking source compatibility, classes were renamed in Swift, which results in a different ObjC name.

Public classes were renamed only on the ObjC side using the @_objcRuntimeName attribute.

This is similar to the work done in pull request #19295. That only renamed @objc classes. This renames all of the others, since even pure Swift classes still get an ObjC name.

rdar://problem/46646438
2019-01-15 12:21:20 -05:00
David Smith
016ced2c44 Adopt the new bulk Dictionary initializer in bridging 2018-12-20 16:57:38 -08:00
Lily Vulcano
d57f714a29 Build crash fix: AnyObject -> NSDictionary
As seen in swift crashers while building https://github.com/apple/swift/pull/20103
2018-12-13 11:03:43 -08:00
Saleem Abdulrasool
41d9c2cc59 stdlib: restructure for OS family layout of SDK overlay
The SDK directory is now confusing as the Windows target also has a SDK
overlay.  In order to make this more uniform, move the SDK directory to
Darwin which covers the fact that this covers the XNU family of OSes.
The Windows directory contains the SDK overlay for the Windows target.
2018-12-06 11:32:05 -08:00