Files
swift-mirror/test/SILOptimizer/unexpected_error.sil
Michael Gottesman fd4828e40a Eliminate -assume-parsing-unqualified-ownership-sil from tests.
I am doing this separately from the actual change to eliminate the option to
make it easier to review.
2018-12-19 12:54:13 -08:00

19 lines
598 B
Plaintext

// RUN: %target-sil-opt -enable-sil-verify-all -dce %s | %FileCheck %s
import Swift
// CHECK-LABEL: sil @unexpected_error : $@convention(thin) (Error) -> () {
sil @unexpected_error : $@convention(thin) (Error) -> () {
entry(%10 : $Error):
// CHECK: builtin "unexpectedError"
%11 = builtin "unexpectedError"(%10 : $Error) : $()
unreachable
}
// CHECK-LABEL: sil @error_in_main : $@convention(thin) (Error) -> () {
sil @error_in_main : $@convention(thin) (Error) -> () {
entry(%10 : $Error):
// CHECK: builtin "errorInMain"
%11 = builtin "errorInMain"(%10 : $Error) : $()
unreachable
}