mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We were unnecessarily conservative here; generic metadata patterns support indirectable references to value witness tables exported by the standard library, so if we have a fixed-layout generic type that matches a known value witness table layout, use that instead of generating a new value witness table.
10 lines
289 B
Swift
10 lines
289 B
Swift
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
|
|
|
|
// CHECK-LABEL: @"$s36generic_metadata_fixed_known_vwtable6StroctVMP" =
|
|
// CHECK-SAME: $sytWV
|
|
struct Stroct<T> {}
|
|
|
|
// CHECK-LABEL: @"$s36generic_metadata_fixed_known_vwtable4EnomOMP" =
|
|
// CHECK-SAME: $sytWV
|
|
enum Enom<T> {}
|