Commit Graph

4 Commits

Author SHA1 Message Date
Jordan Rose
ef47c26313 [test] Update the mock SDK's Dispatch to resemble the real one. (#7879)
This was causing the importer to complain about not being able to map
'dispatch_sync' to 'DispatchQueue.sync(self:execute:)', but only when
building the PCM for our mock Dispatch. That meant that it depended on
the test order whether we'd see issues---if the first test to build
the module didn't check for warnings in other files, it would slip by.
This was usually blocks_parse.swift.

rdar://problem/30475805
2017-03-02 19:00:50 -08:00
Jordan Rose
ec98293c5e [ClangImporter] Import 'NSObject <FooProto> *' as 'id <NSObject, FooProto>'.
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
2015-07-11 00:13:34 +00:00
Doug Gregor
896df201e2 Map the Clang 'noescape' attribute to 'noescape' for @objc_block function parameters.
Fixes rdar://problem/19389222.

Swift SVN r24582
2015-01-21 00:48:25 +00:00
John McCall
653775077d Dispatch.h -> dispatch.h
We have a module map referring to it as dispatch.h, and
this capitalization matches the system, so let's go with it.

Fixes running test/ClangModules/blocks_parse.swift on
case-sensitive file systems.  Apparently I'm the only
person building on a case-sensitive file system.

Swift SVN r23380
2014-11-17 21:02:17 +00:00