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.
11 lines
652 B
Swift
11 lines
652 B
Swift
// RUN: %target-swift-emit-sil %s -I %S/Inputs -enable-cxx-interop | %FileCheck %s
|
|
|
|
import NonMemberOutOfLine
|
|
|
|
public func add(_ lhs: LoadableIntWrapper, _ rhs: LoadableIntWrapper) -> LoadableIntWrapper { lhs + rhs }
|
|
|
|
// CHECK: [[COUNTER:%.*]] = function_ref [[NAME:@(_Zpl18LoadableIntWrapperS_|\?\?H@YA\?AULoadableIntWrapper@@U0@0@Z)]] : $@convention(c) (LoadableIntWrapper, LoadableIntWrapper) -> LoadableIntWrapper
|
|
// CHECK: apply [[COUNTER]](%0, %1) : $@convention(c) (LoadableIntWrapper, LoadableIntWrapper) -> LoadableIntWrapper
|
|
|
|
// CHECK: sil [clang "+"] [[NAME]] : $@convention(c) (LoadableIntWrapper, LoadableIntWrapper) -> LoadableIntWrapper
|