blob: 570460b8ec752d42974fb671e0905938262ee941 [file] [log] [blame]
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests %s -O -emit-sil | %FileCheck %s
protocol Pingable {
func ping(_ x : Int);
}
class Foo : Pingable {
func ping(_ x : Int) { var t : Int }
}
// Everything gets devirtualized, inlined, and promoted to the stack.
//CHECK: @_T024devirtualize_existential17interesting_stuffyyF
//CHECK-NOT: init_existential_addr
//CHECK-NOT: apply
//CHECK: return
public func interesting_stuff() {
var x : Pingable = Foo()
x.ping(1)
}