blob: a93ca38570777ddffcfeb3e7b78b0230687d4d0f [file] [log] [blame]
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s
// REQUIRES: CPU=i386 || CPU=x86_64
func foo<T: AnyObject>(_ x: T) -> T { return x }
// CHECK-LABEL: define hidden swiftcc %objc_object* @"$S23generic_class_anyobject3baryyXlyXlF"(%objc_object*)
// CHECK: call swiftcc %objc_object* @"$S23generic_class_anyobject3foo{{[_0-9a-zA-Z]*}}F"
func bar(_ x: AnyObject) -> AnyObject { return foo(x) }