Files
swift-mirror/test/embedded/managed-buffer.swift
Arnold Schwaighofer d019f37b68 [embedded] Enable support for existentials/boxed protocol types per default
And enable this feature in production.
2025-12-10 08:50:23 -08:00

19 lines
1.4 KiB
Swift

// RUN: %target-swift-emit-ir -disable-embedded-existentials %s -module-name=main -enable-experimental-feature Embedded | %FileCheck %s
// RUN: %target-swift-emit-ir %s -module-name=main -enable-experimental-feature Embedded | %FileCheck %s --check-prefix=EXIST
// REQUIRES: swift_in_compiler
// REQUIRES: swift_feature_Embedded
// CHECK: @"$e4main8MyBufferCN" = {{.*global.*}} <{ ptr @"$es13ManagedBufferCySis5UInt8VGN", ptr @"$e4main8MyBufferCfD{{[^"]*}}", ptr null, ptr @"$e4main8MyBufferC12_doNotCallMeACyt_tcfC{{[^"]*}}" }>
// CHECK: @"$es13ManagedBufferCySis5UInt8VGN" = {{.*global.*}} <{ ptr null, ptr @"$es13ManagedBufferCfDSi_s5UInt8VTgq5{{[^"]*}}", ptr null, ptr @"$es13ManagedBufferC12_doNotCallMeAByxq_Gyt_tcfCSi_s5UInt8VTgq5{{[^"]*}}" }>
// EXIST: @"$e4main8MyBufferCMf" = {{.*}} <{ ptr @"$eBoWV", {{.*}} ptr @"$es13ManagedBufferCySis5UInt8VGMf", i32 0, i32 1), ptr @"$e4main8MyBufferCfD{{[^"]*}}", ptr null, ptr @"$e4main8MyBufferC12_doNotCallMeACyt_tcfC{{[^"]*}}" }>
// EXIST: @"$es13ManagedBufferCySis5UInt8VGMf" = {{.*}} <{ ptr @"$eBoWV", ptr null, ptr @"$es13ManagedBufferCfDSi_s5UInt8VTgq5{{[^"]*}}", ptr null, ptr @"$es13ManagedBufferC12_doNotCallMeAByxq_Gyt_tcfCSi_s5UInt8VTgq5{{[^"]*}}" }>
// EXIST: @"$e4main8MyBufferCN" = {{.*}}alias
// EXIST: @"$es13ManagedBufferCySis5UInt8VGN" = {{.*}}alias
final public class MyBuffer: ManagedBuffer<Int, UInt8> {
}