| // RUN: %empty-directory(%t) |
| // RUN: %target-swift-frontend %S/Inputs/guaranteed-normal-args.swift -o %t/TestModule.swiftmodule -emit-module -module-name TestModule |
| // RUN: %target-sil-opt %s -I=%t |
| |
| // This is a positive test |
| |
| sil_stage canonical |
| |
| import TestModule |
| |
| sil @callFoo : $@convention(thin) (@owned Foo) -> () { |
| bb0(%0 : @guaranteed $Foo): |
| %1 = class_method %0 : $Foo, #Foo.doSomething!1 : (Foo) -> (Foo) -> (), $@convention(method) (@guaranteed Foo, @guaranteed Foo) -> () |
| destroy_value %0 : $Foo |
| %9999 = tuple() |
| return %9999 : $() |
| } |