{ func draw() } struct Triangle : Shape { func draw() init() } @_hasStorage @_hasInitialValue let shape: Shape { get } // shape sil_global hidden [let] @$s6heroes5shapeAA5Shape_pvp : $Shape // main sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 { bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>): alloc_global @$s6heroes5shapeAA5Shape_pvp // id: %2 %3 = global_addr @$s6heroes5shapeAA5Shape_pvp : $*Shape // users: %7, %5 %4 = struct $Triangle () // user: %6 %5 = init_existential_addr %3 : $*Shape, $Triangle // user: %6 store %4 to %5 : $*Triangle // id: %6 %7 = open_existential_addr immutable_access %3 : $*Shape to $*@opened("CA01F70C-D958-11ED-8F40-9E59F6EF2BA0") Shape // users: %9, %9, %8 %8 = witness_method $@opened("CA01F70C-D958-11ED-8F40-9E59F6EF2BA0") Shape, #Shape.draw : <Self where Self : Shape> (Self) -> () -> (), %7 : $*@opened("CA01F70C-D958-11ED-8F40-9E59F6EF2BA0") Shape : $@convention(witness_method: Shape) <τ_0_0 where τ_0_0 : Shape> (@in_guaranteed τ_0_0) -> () // type-defs: %7; user: %9 %9 = apply %8<@opened("CA01F70C-D958-11ED-8F40-9E59F6EF2BA0") Shape>(%7) : $@convention(witness_method: Shape) <τ_0_0 where τ_0_0 : Shape> (@in_guaranteed τ_0_0) -> () // type-defs: %7 %10 = integer_literal $Builtin.Int32, 0 // user: %11 %11 = struct $Int32 (%10 : $Builtin.Int32) // user: %12 return %11 : $Int32 // id: %12 } // end sil function 'main' // Triangle.draw() sil hidden @$s6heroes8TriangleV4drawyyF : $@convention(method) (Triangle) -> () { // %0 "self" // user: %1 bb0(%0 : $Triangle): debug_value %0 : $Triangle, let, name "self", argno 1, implicit // id: %1 %2 = tuple () // user: %3 return %2 : $() // id: %3 } // end sil function '$s6heroes8TriangleV4drawyyF' // Triangle.init() sil hidden @$s6heroes8TriangleVACycfC : $@convention(method) (@thin Triangle.Type) -> Triangle { // %0 "$metatype" bb0(%0 : $@thin Triangle.Type): %1 = struct $Triangle () // user: %2 return %1 : $Triangle // id: %2 } // end sil function '$s6heroes8TriangleVACycfC' // protocol witness for Shape.draw() in conformance Triangle sil private [transparent] [thunk] @$s6heroes8TriangleVAA5ShapeA2aDP4drawyyFTW : $@convention(witness_method: Shape) (@in_guaranteed Triangle) -> () { // %0 // user: %1 bb0(%0 : $*Triangle): %1 = load %0 : $*Triangle // user: %3 // function_ref Triangle.draw() %2 = function_ref @$s6heroes8TriangleV4drawyyF : $@convention(method) (Triangle) -> () // user: %3 %3 = apply %2(%1) : $@convention(method) (Triangle) -> () %4 = tuple () // user: %5 return %4 : $() // id: %5 } // end sil function ‘$s6heroes8TriangleVAA5ShapeA2aDP4drawyyFTW’ // Mappings from '#fileID' to '#filePath': // 'heroes/heroes.swift' => 'heroes.swift' sil_witness_table hidden Triangle: Shape module heroes { method #Shape.draw: <Self where Self : Shape> (Self) -> () -> () : @$s6heroes8TriangleVAA5ShapeA2aDP4drawyyFTW // protocol witness for Shape.draw() in conformance Triangle }