Files
swift-mirror/test/IRGen/objc_errors.sil
Erik Eckstein 8e3b05d2f4 IRGen: Use new mangling for llvm type names.
This should have no effect on the generated binary.
2017-02-22 09:19:10 -08:00

18 lines
578 B
Plaintext

// RUN: rm -rf %t && mkdir -p %t
// RUN: %build-irgen-test-overlays
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s
// REQUIRES: objc_interop
import Swift
import Foundation
// CHECK-LABEL: define{{( protected)?}} swiftcc %swift.error* @errortype_from_nserror(%TSo7NSErrorC*)
// CHECK: %1 = bitcast %TSo7NSErrorC* %0 to %swift.error*
sil @errortype_from_nserror : $@convention(thin) (@owned NSError) -> @owned Error {
entry(%0 : $NSError):
%1 = init_existential_ref %0 : $NSError : $NSError, $Error
return %1 : $Error
}