mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This shrinks the name length if the same bound generic type is used multiple times, like: func foo(_ x: [Int], _ y: [Int])
14 lines
888 B
Swift
14 lines
888 B
Swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -Xllvm -new-mangling-for-tests -emit-silgen %s -import-objc-header %S/Inputs/objc_generic_protocol_conformance.h | %FileCheck --check-prefix=SIL %s
|
|
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -Xllvm -new-mangling-for-tests -emit-ir %s -import-objc-header %S/Inputs/objc_generic_protocol_conformance.h | %FileCheck --check-prefix=IR %s
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
protocol P {
|
|
func foo()
|
|
}
|
|
|
|
extension Foo: P {}
|
|
|
|
// SIL-LABEL: sil hidden [transparent] [thunk] @_T0So3FooCyxG33objc_generic_protocol_conformance1PADs9AnyObjectRzlAdEP3fooyyFTW {{.*}} @pseudogeneric
|
|
// IR-LABEL: define hidden swiftcc void @_T0So3FooCyxG33objc_generic_protocol_conformance1PADs9AnyObjectRzlAdEP3fooyyFTW(%TSo3FooC** noalias nocapture swiftself dereferenceable({{4|8}}), %swift.type*{{( %Self)?}}, i8**{{( %SelfWitnessTable)?}})
|