mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[embedded] Add a stop-gap print() for embedded Swift
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -O -Xllvm -sil-disable-pass=function-signature-opts %s %S/Inputs/print.swift -enable-experimental-feature Embedded -module-name main -emit-irgen | %FileCheck %s --check-prefix CHECK-IR
|
||||
// RUN: %target-swift-frontend -O -Xllvm -sil-disable-pass=function-signature-opts %s %S/Inputs/print.swift -enable-experimental-feature Embedded -c -o %t/main.o
|
||||
// RUN: %target-swift-frontend -O -Xllvm -sil-disable-pass=function-signature-opts %s -parse-as-library -enable-experimental-feature Embedded -module-name main -emit-irgen | %FileCheck %s --check-prefix CHECK-IR
|
||||
// RUN: %target-swift-frontend -O -Xllvm -sil-disable-pass=function-signature-opts %s -parse-as-library -enable-experimental-feature Embedded -c -o %t/main.o
|
||||
// RUN: %target-clang %t/main.o -o %t/a.out -dead_strip
|
||||
// RUN: %target-run %t/a.out | %FileCheck %s
|
||||
|
||||
@@ -72,7 +72,7 @@ struct Main {
|
||||
|
||||
// CHECK-IR: define {{.*}}@"$s4main8MyStructVyAcA0B10FinalClassCcfC"
|
||||
// CHECK-IR-NEXT: entry:
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$s4main5print_10terminatorys12StaticStringV_AEtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$ss5print_10terminatorys12StaticStringV_ADtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@swift_release
|
||||
// CHECK-IR-NEXT: ret void
|
||||
// CHECK-IR-NEXT: }
|
||||
@@ -82,17 +82,17 @@ struct Main {
|
||||
// CHECK-IR-NEXT: alloca %T4main10MySubClassC
|
||||
// CHECK-IR-NEXT: alloca %T4main12MyFinalClassC
|
||||
// CHECK-IR-NEXT: call {{.*}}@swift_initStackObject
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$s4main5print_10terminatorys12StaticStringV_AEtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$s4main5print_10terminatorys12StaticStringV_AEtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$s4main5print_10terminatorys12StaticStringV_AEtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$ss5print_10terminatorys12StaticStringV_ADtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$ss5print_10terminatorys12StaticStringV_ADtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$ss5print_10terminatorys12StaticStringV_ADtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$s4main3bar1oyAA7MyClassC_tF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@swift_setDeallocating
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$s4main5print_10terminatorys12StaticStringV_AEtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$s4main5print_10terminatorys12StaticStringV_AEtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$ss5print_10terminatorys12StaticStringV_ADtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$ss5print_10terminatorys12StaticStringV_ADtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@llvm.lifetime.end.p0
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$s4main5print_10terminatorys12StaticStringV_AEtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$ss5print_10terminatorys12StaticStringV_ADtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@swift_initStackObject
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$s4main5print_10terminatorys12StaticStringV_AEtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$ss5print_10terminatorys12StaticStringV_ADtF"
|
||||
// CHECK-IR-NEXT: call {{.*}}@"$s4main8MyStructVyAcA0B10FinalClassCcfC"
|
||||
// CHECK-IR-NEXT: call {{.*}}@llvm.lifetime.end.p0
|
||||
// CHECK-IR-NEXT: ret {{.*}}0
|
||||
|
||||
Reference in New Issue
Block a user