Files
swift-mirror/test/SIL/Serialization/Recovery/function.sil
Jordan Rose c06e105bd0 [Serialization] Switch to a better hash seed for lookup tables
...fulfilling the promised audit from 0747d9a339. No intended
functionality change /other/ than the order of already-unsorted lists.
This affected a number of SIL tests that relied on deserialization
order matching the original source order; I have no idea why the old
hash logic would make that the case. If we think that's a valuable
property, we should serialize a list of functions in addition to the
iterable table. (Maybe just in SIB mode?)
2019-08-29 09:20:18 -07:00

27 lines
1.1 KiB
Plaintext

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -parse-sil %s -emit-sib -o %t/Library.sib -module-name Library -I %S/Inputs/good-modules -parse-stdlib
// RUN: %target-sil-opt %t/Library.sib -I %S/Inputs/good-modules -emit-sorted-sil | %FileCheck %s
// RUN: %target-sil-opt %t/Library.sib -I %S/Inputs/bad-modules -emit-sorted-sil | %FileCheck -check-prefix=CHECK-RECOVERY %s
// RUN: %target-sil-opt %t/Library.sib -I %S/Inputs/bad-modules -emit-sorted-sil | %FileCheck -check-prefix=CHECK-RECOVERY-NEGATIVE %s
// CHECK-LABEL: sil_stage raw
// CHECK-RECOVERY-LABEL: sil_stage raw
sil_stage raw
import Types
// CHECK-LABEL: sil @missingParam : $@convention(thin) (SoonToBeMissing) -> () {
// CHECK-RECOVERY-NEGATIVE-NOT: sil [ossa] @missingParam
sil [ossa] @missingParam : $@convention(thin) (SoonToBeMissing) -> () {
entry(%arg : $SoonToBeMissing):
%9999 = tuple()
return %9999 : $()
}
// CHECK-LABEL: sil @missingResult : $@convention(thin) () -> SoonToBeMissing {
// CHECK-RECOVERY-NEGATIVE-NOT: sil @missingResult
sil @missingResult : $@convention(thin) () -> (SoonToBeMissing) {
entry:
unreachable
}