Slide 11
Slide 11 text
Swift Calling Convention
; lowered as:
; declare swiftcc void @foo(i32, i32, swiftself i32, swifterror i32);
declare swiftcc void @foo(i32, i32)
@data = global i8* bitcast (void (i32, i32)* @foo to i8*)
define void @main() {
%1 = load i8*, i8** @data
%2 = bitcast i8* %1 to void (i32, i32, i32, i32)*
call swiftcc void %2(i32 1, i32 2, i32 swiftself 0, swifterror 0)
%3 = bitcast i8* %1 to void (i32, i32, i32)*
; lowered as:
; call swiftcc void %2(i32 1, i32 2, i32 swiftself 0, i32 swifterror 0)
call swiftcc void %3(i32 1, i32 2, i32 swiftself 0)
ret void
}
https://reviews.llvm.org/D76049 11