blob: 3ef082dc2e8a010d26d3a6cc265f75ace27e2e0f [file] [log] [blame]
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
// REQUIRES: CPU=i386_or_x86_64
// CHECK: define hidden void @_TF15indirect_return11generic_get
func generic_get<T>(p: UnsafeMutablePointer<T>) -> T {
// CHECK-NOT: [[T0:%.*]] = call i8* @_TFVs20UnsafeMutablePointerl6memoryQ_(i8* %1, %swift.type* %T)
// CHECK: [[T1:%.*]] = bitcast i8* {{%.*}} to %swift.opaque*
// CHECK: call %swift.opaque* {{%.*}}(%swift.opaque* %0, %swift.opaque* [[T1]], %swift.type* %T)
return p.pointee
}