Files
swift-mirror/test/IRGen/addressable_for_dependencies_metadata.swift
Joe Groff 7e99e84070 Add an "addressable for dependencies" flag to value witness flags.
This may be useful for type layout of borrow fields in the future, should we
decide that addressable-for-dependencies borrows should always be represented
by a pointer. rdar://153650278
2025-06-18 12:47:16 -07:00

20 lines
666 B
Swift

// RUN: %empty-directory(%t)
// RUN: %{python} %utils/chex.py < %s > %t/test.swift
// RUN: %target-swift-frontend -enable-experimental-feature AddressableTypes -emit-ir %s | %FileCheck %t/test.swift
// REQUIRES: swift_feature_AddressableTypes
@_addressableForDependencies
struct DirectlyAFD {
var x: Int32
}
// CHECK-LABEL: @"$s{{.*}}11DirectlyAFDVWV" =
// -- 0x0200_0000: addressable for dependencies
// CHECK-SAME: , [[WORD:i(64|32)]] 4, [[WORD]] 4, <i32 0x0200_0003>, i32 0 }
struct IndirectlyAFD {
var directly: DirectlyAFD
}
// CHECK-LABEL: @"$s{{.*}}13IndirectlyAFDVWV" =
// CHECK-SAME: , [[WORD:i(64|32)]] 4, [[WORD]] 4, <i32 0x0200_0003>, i32 0 }