mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
While the comment is correct to state that this won't enable any new optimizations with -Onone, it does enable IRGen's lazy function emission, which is important for 'reasync' functions, which we don't want to emit at all even at -Onone. This fixes debug stdlib builds with the new reasync versions of the &&, || and ?? operators.
14 lines
427 B
Swift
14 lines
427 B
Swift
// RUN: %target-swift-frontend %s -whole-module-optimization -emit-sil | %FileCheck %s
|
|
|
|
public class C {
|
|
public func f() {}
|
|
}
|
|
|
|
//CHECK-LABEL: sil @$s32devirtualize_inlinable_mandatory1gyyAA1CCF : $@convention(thin) (@guaranteed C) -> () {
|
|
//CHECK: class_method %0 : $C, #C.f : (C) -> () -> (), $@convention(method) (@guaranteed C) -> ()
|
|
//CHECK-NOT: function_ref
|
|
//CHECK: return
|
|
@inlinable public func g(_ x: C) {
|
|
x.f()
|
|
}
|