blob: 5d926e58fe6f43a1ec644eee8834bcd8601e4f2e [file] [log] [blame]
// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s
sil_stage canonical
protocol P { func foo() }
// CHECK-LABEL: define{{( protected)?}} void @phi_witness_method(%swift.type* %T, i8** %T.P) #0 {
sil @phi_witness_method : $@convention(thin) <T: P> () -> () {
entry:
%1 = witness_method $T, #P.foo!1 : $@convention(witness_method) <T: P> (@in P) -> ()
br bb1(%1 : $@convention(witness_method) <T: P> (@in P) -> ())
// CHECK: phi i8* [ %0, %entry ]
// CHECK-NEXT: phi i8** [ %T.P, %entry ]
bb1(%2 : $@convention(witness_method) <T: P> (@in P) -> ()):
unreachable
}