-
-
Save rintaro/8794ecd01e78e6b001fce192b07f2d7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define void @_TF4test5XXXXXuRxS_7MYPROTOrFT3argx_T_(%swift.opaque* noalias nocapture, %swift.type* %T, i8** %T.MYPROTO) #0 { | |
entry: | |
%1 = bitcast i8** %T.MYPROTO to void (%swift.opaque*, %swift.type*, i8**)** | |
%2 = load void (%swift.opaque*, %swift.type*, i8**)*, void (%swift.opaque*, %swift.type*, i8**)** %1, align 8, !invariant.load !11 | |
tail call void %2(%swift.opaque* noalias nocapture %0, %swift.type* %T, i8** %T.MYPROTO) | |
%3 = getelementptr inbounds %swift.type, %swift.type* %T, i64 -1 | |
%4 = bitcast %swift.type* %3 to i8*** | |
%T.valueWitnesses = load i8**, i8*** %4, align 8, !invariant.load !11, !dereferenceable !12 | |
%5 = getelementptr inbounds i8*, i8** %T.valueWitnesses, i64 4 | |
%6 = bitcast i8** %5 to void (%swift.opaque*, %swift.type*)** | |
%7 = load void (%swift.opaque*, %swift.type*)*, void (%swift.opaque*, %swift.type*)** %6, align 8, !invariant.load !11 | |
tail call void %7(%swift.opaque* %0, %swift.type* %T) #6 | |
ret void | |
} | |
define void @_TF4test5YYYYYFT3argPS_7MYPROTO__T_(%P4test7MYPROTO_* noalias nocapture dereferenceable(40)) #0 { | |
entry: | |
%1 = getelementptr inbounds %P4test7MYPROTO_, %P4test7MYPROTO_* %0, i64 0, i32 1 | |
%2 = load %swift.type*, %swift.type** %1, align 8 | |
%3 = getelementptr inbounds %P4test7MYPROTO_, %P4test7MYPROTO_* %0, i64 0, i32 0 | |
%4 = getelementptr inbounds %swift.type, %swift.type* %2, i64 -1 | |
%5 = bitcast %swift.type* %4 to i8*** | |
%.valueWitnesses = load i8**, i8*** %5, align 8, !invariant.load !11, !dereferenceable !12 | |
%6 = getelementptr inbounds i8*, i8** %.valueWitnesses, i64 2 | |
%7 = bitcast i8** %6 to %swift.opaque* ([24 x i8]*, %swift.type*)** | |
%8 = load %swift.opaque* ([24 x i8]*, %swift.type*)*, %swift.opaque* ([24 x i8]*, %swift.type*)** %7, align 8, !invariant.load !11 | |
%9 = tail call %swift.opaque* %8([24 x i8]* %3, %swift.type* %2) #6 | |
%10 = getelementptr inbounds %P4test7MYPROTO_, %P4test7MYPROTO_* %0, i64 0, i32 2 | |
%11 = load i8**, i8*** %10, align 8 | |
%12 = bitcast i8** %11 to void (%swift.opaque*, %swift.type*, i8**)** | |
%13 = load void (%swift.opaque*, %swift.type*, i8**)*, void (%swift.opaque*, %swift.type*, i8**)** %12, align 8, !invariant.load !11 | |
tail call void %13(%swift.opaque* noalias nocapture %9, %swift.type* %2, i8** %11) | |
%14 = load %swift.type*, %swift.type** %1, align 8 | |
%15 = getelementptr inbounds %swift.type, %swift.type* %14, i64 -1 | |
%16 = bitcast %swift.type* %15 to void ([24 x i8]*, %swift.type*)*** | |
%.valueWitnesses12 = load void ([24 x i8]*, %swift.type*)**, void ([24 x i8]*, %swift.type*)*** %16, align 8, !invariant.load !11, !dereferenceable !12 | |
%17 = load void ([24 x i8]*, %swift.type*)*, void ([24 x i8]*, %swift.type*)** %.valueWitnesses12, align 8, !invariant.load !11 | |
tail call void %17([24 x i8]* %3, %swift.type* %14) #6 | |
ret void | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public protocol MYPROTO { | |
func foo() | |
} | |
public func XXXXX<T : MYPROTO>(arg: T) { | |
arg.foo() | |
} | |
public func YYYYY(arg: MYPROTO) { | |
arg.foo() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment