mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When the new mangling is enabled permanently, the option can be removed from the RUN command lines again.
20 lines
481 B
Swift
20 lines
481 B
Swift
// 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)
|
|
}
|
|
|