mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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>.
23 lines
1.5 KiB
Swift
23 lines
1.5 KiB
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %swift -target thumbv7--windows-itanium -parse-as-library -disable-legacy-type-info -parse-stdlib -emit-module-path %t/module.swiftmodule -module-name module -module-link-name module %s
|
|
// RUN: %swift -target thumbv7--windows-itanium -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -emit-ir -o - %s | %FileCheck %s -check-prefix CHECK-MSVC-IR
|
|
// RUN: %swift -target thumbv7--windows-itanium -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -S -o - %s | %FileCheck %s -check-prefix CHECK-MSVC-ASM
|
|
|
|
// RUN: %swift -target thumbv7--windows-msvc -parse-as-library -disable-legacy-type-info -parse-stdlib -emit-module-path %t/module.swiftmodule -module-name module -module-link-name module %s
|
|
// RUN: %swift -target thumbv7--windows-msvc -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -emit-ir -o - %s | %FileCheck %s -check-prefix CHECK-MSVC-IR
|
|
// RUN: %swift -target thumbv7--windows-msvc -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -S -o - %s | %FileCheck %s -check-prefix CHECK-MSVC-ASM
|
|
|
|
// REQUIRES: CODEGENERATOR=ARM
|
|
|
|
#if MAIN_MODULE
|
|
import module
|
|
#endif
|
|
|
|
// CHECK-MSVC-IR: !llvm.linker.options = !{[[LIST:![0-9]+]]}
|
|
// CHECK-MSVC-IR: [[LIST]] = !{!"/DEFAULTLIB:module.lib"}
|
|
|
|
// CHECK-MSVC-ASM: .section .drectve
|
|
// CHECK-MSVC-ASM: .ascii " /DEFAULTLIB:module.lib"
|
|
|