mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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.
24 lines
1021 B
Swift
24 lines
1021 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -emit-module %S/Inputs/linker_pass_input.swift -o %t/Swift.swiftmodule -parse-stdlib -parse-as-library -module-name Swift -module-link-name swiftCore
|
|
// RUN: %target-swift-frontend %s -I %t -emit-sil | %FileCheck %s
|
|
// RUN: %target-swift-frontend %s -I %t -O -emit-sil | %FileCheck %s --check-prefix=OPT
|
|
|
|
// CHECK: sil [noinline] @$ss11doSomethingyyF : $@convention(thin) () -> (){{$}}
|
|
// OPT: sil public_external [noinline] @$ss11doSomethingyyF : $@convention(thin) () -> () {
|
|
doSomething()
|
|
|
|
// CHECK: sil @$ss12doSomething2yyF : $@convention(thin) () -> ()
|
|
// CHECK-NOT: return
|
|
doSomething2()
|
|
|
|
// CHECK: sil [noinline] @$ss16callDoSomething3yyF : $@convention(thin) () -> (){{$}}
|
|
// OPT: sil public_external [noinline] @$ss16callDoSomething3yyF : $@convention(thin) () -> () {
|
|
|
|
// OPT: sil @unknown
|
|
|
|
// OPT: sil @$ss1AVABycfC
|
|
|
|
// OPT: sil [noinline] @$ss12doSomething3yyxlF : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0) -> (){{$}}
|
|
|
|
callDoSomething3()
|