Slide 16
Slide 16 text
Callerଆ LLVM IR
define i32 @main(i32, i8**) #0 {
entry:
%swifterror = alloca %swift.error*, align 4
store %swift.error* null, %swift.error** %swifterror, align 4
%2 = bitcast i8** %1 to i8*
store i8* bitcast (void ()* @"$s16throws_subtypingyycfU_" to i8*),
i8** getelementptr inbounds (%swift.function, %swift.function* @"$s16throws_subtyping1fyycvp", i32 0, i32 0), align 4
store %swift.refcounted* null,
%swift.refcounted** getelementptr inbounds (%swift.function, %swift.function* @"$s16throws_subtyping1fyycvp", i32 0, i32 1), align 4
%3 = load i8*, i8** getelementptr inbounds (%swift.function, %swift.function* @"$s16throws_subtyping1fyycvp", i32 0, i32 0), align 4
%4 = load %swift.refcounted*,
%swift.refcounted** getelementptr inbounds (%swift.function, %swift.function* @"$s16throws_subtyping1fyycvp", i32 0, i32 1), align 4
%5 = call %swift.refcounted* @swift_retain(%swift.refcounted* returned %4) #1
store i8* %3, i8** getelementptr inbounds (%swift.function, %swift.function* @"$s16throws_subtyping1gyyKcvp", i32 0, i32 0), align 4
store %swift.refcounted* %4,
%swift.refcounted** getelementptr inbounds (%swift.function, %swift.function* @"$s16throws_subtyping1gyyKcvp", i32 0, i32 1), align 4
%6 = load i8*,
i8** getelementptr inbounds (%swift.function, %swift.function* @"$s16throws_subtyping1gyyKcvp", i32 0, i32 0), align 4
%7 = load %swift.refcounted*,
%swift.refcounted** getelementptr inbounds (%swift.function, %swift.function* @"$s16throws_subtyping1gyyKcvp", i32 0, i32 1), align 4
%8 = call %swift.refcounted* @swift_retain(%swift.refcounted* returned %7) #1
%9 = bitcast i8* %6 to void (%swift.refcounted*, %swift.error**)*
call swiftcc void %9(%swift.refcounted* swiftself %7, %swift.error** noalias nocapture dereferenceable(4) %swifterror)
...
}
16