runtime: make _SwiftNativeNSError use the Hashable conformance, if available

If the Swift error wrapped in a _SwiftNativeNSError box conforms to
Hashable, the box now uses the Swift's conformance to Hashable.

Part of rdar://problem/27574348.
This commit is contained in:
Dmitri Gribenko
2016-08-01 20:28:14 -07:00
parent 08c772fdac
commit b162f60070
12 changed files with 400 additions and 42 deletions

View File

@@ -17,13 +17,15 @@
//
//===----------------------------------------------------------------------===//
#include "swift/Runtime/Config.h"
#if !SWIFT_OBJC_INTEROP
#include <stdio.h>
#include "swift/Runtime/Debug.h"
#include "ErrorObject.h"
#include "Private.h"
#if !SWIFT_OBJC_INTEROP
using namespace swift;
/// Determine the size and alignment of an Error box containing the given