mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The layouts of resilient value types shipped in the Swift 5 standard library x and overlays will forever be frozen in time for backward deployment to old Objective-C runtimes. This PR ensures that even if the layouts of these types evolve in the future, binaries built to run on the old runtime will continue to lay out class instances in a manner compatible with Swift 5. Fixes <rdar://problem/45646886>.
25 lines
1.3 KiB
Plaintext
25 lines
1.3 KiB
Plaintext
// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target x86_64-apple-macosx10.9 -module-name main %s -o - | %FileCheck %s
|
|
// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target i386-apple-ios7.0 %s -module-name main -o - | %FileCheck %s
|
|
// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target x86_64-apple-ios7.0 %s -module-name main -o - | %FileCheck %s
|
|
// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target armv7-apple-ios7.0 %s -module-name main -o - | %FileCheck %s
|
|
// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target arm64-apple-ios7.0 %s -module-name main -o - | %FileCheck %s
|
|
// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target x86_64-unknown-linux-gnu %s -module-name main -o - | %FileCheck %s
|
|
|
|
// REQUIRES: CODEGENERATOR=X86
|
|
// REQUIRES: CODEGENERATOR=ARM
|
|
|
|
import Builtin
|
|
|
|
struct Pair<T> {
|
|
var fst: T, snd: T
|
|
}
|
|
|
|
struct Huge {
|
|
var pairs: Pair<Pair<Pair<Pair<Pair<Pair<Pair<Pair<Pair<Builtin.Int64>>>>>>>>>
|
|
var unalign: Builtin.Int8
|
|
}
|
|
|
|
// CHECK: define linkonce_odr hidden i8* @__swift_memcpy4097_8(i8*, i8*, %swift.type*)
|
|
// CHECK: call void @llvm.memcpy.p0i8.p0i8.{{(i64|i32)}}(i8* align 8 %0, i8* align 8 %1, {{(i64|i32)}} 4097, i1 false)
|
|
// CHECK: ret i8* %0
|