This is needed if we compile StdlibUnittest with -sil-serialize-all
So far I added the imports only in files which needed them. But this may change, depending on the optimizer (inlining).
Adding them in all files doesn't harm and avoids confusion if someone makes an unrelated change which would result in such a linker error.
Some GCD APIs rely on the pointer identity of blocks, so avoid bridging
when possible. The easiest way to do this was to use our existing rules
for special-casing typedefs.
The summary text for dispatch_block_t comes from the actual GCD headers.
rdar://problem/22432170
Swift SVN r31634
This is usually a more helpful type than our alternative, 'NSObject', although
it's not Equatable or Hashable. Since pretty much everything from Objective-C
inherits from NSObject, though, keeping the protocol qualifiers is much more
useful from a type-safety perspective.
The particular benefit for this comes with a change to libdispatch's <os/object.h>:
with dispatch types all declaring that they inherit from NSObjectProtocol, the
canonical form of the imported 'dispatch_queue_t' is now just a simple protocol
reference. That's type-safe as above, but is also a type that can be extended.
rdar://problem/16213421
Swift SVN r30100
This decreases total testing time by over a minute on my old Mac Pro.
It probably has much less effect on systems with fewer cores, but shouldn't
be any worse there.
Swift SVN r22745