Files
swift-mirror/test/SILOptimizer/opaque_values_O.swift
Nate Chandler f6c07732ec [AddressLowering] Set new ParamDecl's specifier.
It's required that ParamDecl's that are synthesized have a specifier
set.  Set it to InOut, matching SILGen's behavior in
emitIndirectResultParameters.
2022-11-16 17:14:23 -08:00

12 lines
557 B
Swift

// RUN: %target-swift-frontend -enable-sil-opaque-values -parse-as-library -emit-sil -O %s | %FileCheck %s
// Verify the arguments. When AccessPathVerification runs, it will be checked
// that the ParamDecl that AddressLowering synthesizes has a specifier
// (ParamSpecifier) set.
// CHECK-LABEL: sil @$s15opaque_values_O3minyxx_xtSLRzlF : {{.*}} {
// CHECK: bb0(%0 : $*T, %1 : $*T, %2 : $*T):
// CHECK-LABEL: } // end sil function '$s15opaque_values_O3minyxx_xtSLRzlF'
public func min<T: Comparable>(_ x: T, _ y: T) -> T {
return y < x ? y : x
}