Commit Graph

6 Commits

Author SHA1 Message Date
Doug Gregor
ec4bf005af [AST] Eliminate unnecessary #includes of AST/ProtocolConformance.h. 2017-03-01 08:22:39 -08:00
Hugh Bellamy
7a5ef4bdd1 Support building swift/AST with MSVC on Windows 2017-01-09 09:05:06 +00:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Doug Gregor
ca4a32b5a9 [SE-0112] Bridge NSError to ErrorProtocol.
Introduce bridging of NSError to ErrorProtocol, so an Objective-C API
expressed via an "NSError *" will be imported using ErrorProtocol in
the Swift. For example, the Objective-C method:

  - (void)handleError:(NSError *)error userInteractionPermitted:(BOOL)userInteractionPermitted;

will now be imported as:

  func handleError(_ error: ErrorProtocol, userInteractionPermitted: Bool)

This is bullet (3) under the proposed solution of SE-0112. Note that
we made one semantic change here: instead of removing the conformance
of NSError to ErrorProtocol, which caused numerous problems both
theoretical and actual because the model expects that an NSError
conforms to ErrorProtocol without requiring wrapping, we instead limit
the ErrorProtocol -> NSError conversion that would be implied by
bridging. This is defensible in the short term because it also
eliminates the implicit conversion, and aligns with SE-0072, which
eliminates implicit bridging conversions altogether.
2016-07-12 10:53:52 -07:00
Jordan Rose
695d73e856 Rework the signature for ASTContext::getForeignRepresentable.
- Extract the cache entry type to a top-level type that can be used in the
  signature of the function.
- Rewrite the implementation of the type in terms of standard LLVM ADTs
  instead of manual bit manipulation.
- Add support for trivial-with-optional types (none of which exist yet).
- Drop the use of SIL/BridgedTypes.def; the only non-trivial non-object
  bridged type today is 'Bool' (for ObjCBool and DarwinBoolean) and that's
  already trivially bridged to CBool too.
- Save an Identifier lookup when possible.
- Finally, rename the function to getForeignRepresentationInfo.

No intended functionality change.
2016-04-11 17:55:10 -07:00