[var_decl] $File, let, name "f", type $File %1 = mark_unresolved_non_copyable_value [consumable_and_assignable] %0 // f の初期化 store %8 to [init] %1 // let g = f %11 = load [copy] %1 store %11 to [init] %10 // f.close() %13 = load [copy] %1 %15 = apply %14(%13) : $@convention(method) (@owned File) -> ()
// f の格納領域とマーカー %0 = alloc_stack [lexical] [var_decl] $File, let, name "f", type $File %1 = mark_unresolved_non_copyable_value [consumable_and_assignable] %0 // f の初期化 store %8 to [init] %1 // let g = f %11 = load [copy] %1 store %11 to [init] %10 // f.close() %13 = load [copy] %1 %15 = apply %14(%13) : $@convention(method) (@owned File) -> () https://github.com/swiftlang/swift/blob/release/6.4.x/lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerUtils.cpp#L2931-L2999