mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We are already doing this for most of the target-swift-frontend ones. In a subsequent commit, I am going to remove the redundant ones. NOTE: On Darwin, I have not enabled it on the %target-swift-frontend mock SDK commands. I ran into an issue with one of the PrintAsObjC tests that I am still tracking down. I would rather just get this turned on to prevent further regressions. I also updated a few tests that needed some small tweaks to pass this. Specifically: 1. Some parser tests needed some extra ossa insts to pass the verifier. This doesn't effect what they actually test. 2. IRGen tests that should never have processed ossa directly. Today, we are working towards a world where IRGen never processes [ossa] directly. Instead we lower first. If/when that changes, we should add back in specific [ossa] tests. 3. A singular SILOptimizer definite init test case where the ownership verifier fails due to a case which DI already flags as illegal (we just crash earlier). I am going to look into fixing that by putting in errors in the typechecker or in SILGen (not sure yet). I changed it to use target-swiftc_driver which does not have ownership verification enabled.
26 lines
603 B
Plaintext
26 lines
603 B
Plaintext
// RUN: %target-swift-frontend %s -parse-stdlib -module-name Swift -emit-silgen | %FileCheck %s
|
|
|
|
enum Optional<T> {
|
|
case none
|
|
case some(T)
|
|
}
|
|
|
|
enum ImplicitlyUnwrappedOptional<T> {
|
|
case none
|
|
case some(T)
|
|
}
|
|
|
|
class SelfTest {}
|
|
|
|
sil_vtable SelfTest {}
|
|
|
|
sil @test_stuff : $@convention(method) (@owned SelfTest) -> () {
|
|
bb0(%0 : $SelfTest):
|
|
// CHECK: metatype $@thick @dynamic_self SelfTest
|
|
%2 = metatype $@thick @dynamic_self SelfTest.Type
|
|
// CHECK: metatype $@thick Optional<@dynamic_self SelfTest>.Type
|
|
%5 = metatype $@thick @dynamic_self SelfTest?.Type
|
|
%7 = tuple ()
|
|
return %7 : $()
|
|
}
|