mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ownership] Enable ownership verification by default.
I also removed the -verify-sil-ownership flag in favor of a disable flag -disable-sil-ownership-verifier. I used this on only two tests that still need work to get them to pass with ownership, but whose problems are well understood, small corner cases. I am going to fix them in follow on commits. I detail them below: 1. SILOptimizer/definite_init_inout_super_init.swift. This is a test case where DI is supposed to error. The only problem is that we crash before we error since the code emitting by SILGen to trigger this error does not pass ownership invariants. I have spoken with JoeG about this and he suggested that I fix this earlier in the compiler. Since we do not run the ownership verifier without asserts enabled, this should not affect compiler users. Given that it has triggered DI errors previously I think it is safe to disable ownership here. 2. PrintAsObjC/extensions.swift. In this case, the signature generated by type lowering for one of the thunks here uses an unsafe +0 return value instead of doing an autorelease return. The ownership checker rightly flags this leak. This is going to require either an AST level change or a change to TypeLowering. I think it is safe to turn this off since it is such a corner case that it was found by a test that has nothing to do with it. rdar://43398898
This commit is contained in:
@@ -314,7 +314,6 @@ function (swift_benchmark_compile_archopts)
|
||||
|
||||
set(common_options
|
||||
"-c"
|
||||
"-Xfrontend" "-verify-sil-ownership"
|
||||
"-target" "${target}"
|
||||
"-${BENCH_COMPILE_ARCHOPTS_OPT}" ${PAGE_ALIGNMENT_OPTION})
|
||||
|
||||
@@ -344,7 +343,6 @@ function (swift_benchmark_compile_archopts)
|
||||
|
||||
set(common_options_driver
|
||||
"-c"
|
||||
"-Xfrontend" "-verify-sil-ownership"
|
||||
"-target" "${target}"
|
||||
"-${driver_opt}")
|
||||
|
||||
|
||||
@@ -236,7 +236,6 @@ function(_compile_swift_files
|
||||
endif()
|
||||
|
||||
if(SWIFTFILE_IS_STDLIB)
|
||||
list(APPEND swift_flags "-Xfrontend" "-verify-sil-ownership")
|
||||
list(APPEND swift_flags "-Xfrontend" "-enable-mandatory-semantic-arc-opts")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
std::string SILOutputFileNameForDebugging;
|
||||
|
||||
/// If set to true, compile with the SIL Ownership Model enabled.
|
||||
bool VerifySILOwnership = false;
|
||||
bool VerifySILOwnership = true;
|
||||
|
||||
/// Assume that code will be executed in a single-threaded environment.
|
||||
bool AssumeSingleThreaded = false;
|
||||
|
||||
@@ -299,8 +299,8 @@ def emit_pch : Flag<["-"], "emit-pch">,
|
||||
def pch_disable_validation : Flag<["-"], "pch-disable-validation">,
|
||||
HelpText<"Disable validating the persistent PCH">;
|
||||
|
||||
def verify_sil_ownership : Flag<["-"], "verify-sil-ownership">,
|
||||
HelpText<"Verify ownership invariants during SIL Verification ">;
|
||||
def disable_sil_ownership_verifier : Flag<["-"], "disable-sil-ownership-verifier">,
|
||||
HelpText<"Do not verify ownership invariants during SIL Verification ">;
|
||||
|
||||
def enable_mandatory_semantic_arc_opts : Flag<["-"], "enable-mandatory-semantic-arc-opts">,
|
||||
HelpText<"Enable the mandatory semantic arc optimizer">;
|
||||
|
||||
@@ -767,7 +767,7 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
|
||||
Opts.EmitProfileCoverageMapping |= Args.hasArg(OPT_profile_coverage_mapping);
|
||||
Opts.DisableSILPartialApply |=
|
||||
Args.hasArg(OPT_disable_sil_partial_apply);
|
||||
Opts.VerifySILOwnership |= Args.hasArg(OPT_verify_sil_ownership);
|
||||
Opts.VerifySILOwnership &= !Args.hasArg(OPT_disable_sil_ownership_verifier);
|
||||
Opts.EnableMandatorySemanticARCOpts |=
|
||||
Args.hasArg(OPT_enable_mandatory_semantic_arc_opts);
|
||||
Opts.EnableLargeLoadableTypes |= Args.hasArg(OPT_enable_large_loadable_types);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -module-name optional -I %S/Inputs/custom-modules -verify-sil-ownership -emit-silgen -o - %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -module-name optional -I %S/Inputs/custom-modules -emit-silgen -o - %s | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %build-irgen-test-overlays
|
||||
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -verify-sil-ownership -emit-ir | %FileCheck %s
|
||||
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s
|
||||
|
||||
// REQUIRES: CPU=x86_64
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-build-swift -Xfrontend -verify-sil-ownership -swift-version 4 %s -o %t/a.out -enforce-exclusivity=checked -Onone
|
||||
// RUN: %target-build-swift -swift-version 4 %s -o %t/a.out -enforce-exclusivity=checked -Onone
|
||||
//
|
||||
// RUN: %target-codesign %t/a.out
|
||||
// RUN: %target-run %t/a.out
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
// RUN: %swiftc_driver -parse-sil -Xfrontend -disable-legacy-type-info -target arm64-apple-ios8.0 -target-cpu cyclone \
|
||||
// RUN: -O -S %s -parse-as-library -parse-stdlib -module-name Swift \
|
||||
// RUN: -Xfrontend -verify-sil-ownership | \
|
||||
// RUN: | \
|
||||
// RUN: %FileCheck --check-prefix=TBI %s
|
||||
|
||||
// RUN: %swiftc_driver -parse-sil -Xfrontend -disable-legacy-type-info -target arm64-apple-ios7.0 -target-cpu cyclone \
|
||||
// RUN: -O -S %s -parse-as-library -parse-stdlib -module-name Swift \
|
||||
// RUN: -Xfrontend -verify-sil-ownership | \
|
||||
// RUN: | \
|
||||
// RUN: %FileCheck --check-prefix=NO_TBI %s
|
||||
|
||||
// REQUIRES: CODEGENERATOR=AArch64
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Please keep this file in alphabetical order!
|
||||
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -verify-sil-ownership -emit-module -o %t %s -disable-objc-attr-requires-foundation-module
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -verify-sil-ownership -parse-as-library %t/blocks.swiftmodule -typecheck -emit-objc-header-path %t/blocks.h -import-objc-header %S/../Inputs/empty.h -disable-objc-attr-requires-foundation-module
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t %s -disable-objc-attr-requires-foundation-module
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse-as-library %t/blocks.swiftmodule -typecheck -emit-objc-header-path %t/blocks.h -import-objc-header %S/../Inputs/empty.h -disable-objc-attr-requires-foundation-module
|
||||
// RUN: %FileCheck %s < %t/blocks.h
|
||||
// RUN: %check-in-clang %t/blocks.h
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Please keep this file in alphabetical order!
|
||||
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t %s -disable-objc-attr-requires-foundation-module
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse-as-library %t/extensions.swiftmodule -typecheck -emit-objc-header-path %t/extensions.h -import-objc-header %S/../Inputs/empty.h -disable-objc-attr-requires-foundation-module
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-sil-ownership-verifier -emit-module -o %t %s -disable-objc-attr-requires-foundation-module
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-sil-ownership-verifier -parse-as-library %t/extensions.swiftmodule -typecheck -emit-objc-header-path %t/extensions.h -import-objc-header %S/../Inputs/empty.h -disable-objc-attr-requires-foundation-module
|
||||
// RUN: %FileCheck %s < %t/extensions.h
|
||||
// RUN: %FileCheck --check-prefix=NEGATIVE %s < %t/extensions.h
|
||||
// RUN: %check-in-clang %t/extensions.h
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-build-swift %s -Xfrontend -verify-sil-ownership -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_switchenum -o %t/main
|
||||
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_switchenum -o %t/main
|
||||
|
||||
// This unusual use of 'sh' allows the path of the profraw file to be
|
||||
// substituted by %target-run.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership %s | %target-sil-opt -verify-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt %s | %target-sil-opt | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership %s | %target-sil-opt -verify-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt %s | %target-sil-opt | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// First parse this and then emit a *.sib. Then read in the *.sib, then recreate
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-sil-opt -verify-sil-ownership %s -emit-sib -o %t/tmp.sib -module-name borrow
|
||||
// RUN: %target-sil-opt -verify-sil-ownership %t/tmp.sib -o %t/tmp.2.sib -module-name borrow
|
||||
// RUN: %target-sil-opt -verify-sil-ownership %t/tmp.2.sib -module-name borrow | %FileCheck %s
|
||||
// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name borrow
|
||||
// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.2.sib -module-name borrow
|
||||
// RUN: %target-sil-opt %t/tmp.2.sib -module-name borrow | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// First parse this and then emit a *.sib. Then read in the *.sib, then recreate
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-sil-opt -verify-sil-ownership %s -emit-sib -o %t/tmp.sib -module-name literals
|
||||
// RUN: %target-sil-opt -verify-sil-ownership %t/tmp.sib -o %t/tmp.2.sib -module-name literals
|
||||
// RUN: %target-sil-opt -verify-sil-ownership %t/tmp.2.sib -module-name literals | %FileCheck %s
|
||||
// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name literals
|
||||
// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.2.sib -module-name literals
|
||||
// RUN: %target-sil-opt %t/tmp.2.sib -module-name literals | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -module-name Swift -sil-ownership-verifier-enable-testing -verify-sil-ownership -enable-sil-verify-all=0 %s -o /dev/null 2>&1 | %FileCheck %s
|
||||
// RUN: %target-sil-opt -module-name Swift -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 %s -o /dev/null 2>&1 | %FileCheck %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This is a test that verifies ownership behavior around arguments that should
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 %s -o /dev/null 2>&1 | %FileCheck %s
|
||||
// RUN: %target-sil-opt -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 %s -o /dev/null 2>&1 | %FileCheck %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all=0 %s -o /dev/null
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all=0 %s -o /dev/null
|
||||
// REQUIRES: asserts
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -module-name Swift -verify-sil-ownership -enable-sil-verify-all=0 -o /dev/null 2>&1 %s
|
||||
// RUN: %target-sil-opt -module-name Swift -enable-sil-verify-all=0 -o /dev/null 2>&1 %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
sil_stage raw
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 %s -o /dev/null 2>&1 | %FileCheck %s
|
||||
// RUN: %target-sil-opt -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 %s -o /dev/null 2>&1 | %FileCheck %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This test makes sure that the ownership verifier can be disabled on specific
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -module-name Swift -verify-sil-ownership -enable-sil-verify-all=0 -o /dev/null 2>&1 %s
|
||||
// RUN: %target-sil-opt -module-name Swift -enable-sil-verify-all=0 -o /dev/null 2>&1 %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This file is meant to contain dataflow tests that if they fail are false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -module-name Swift -sil-ownership-verifier-enable-testing -verify-sil-ownership -enable-sil-verify-all=0 %s -o /dev/null 2>&1 | %FileCheck %s
|
||||
// RUN: %target-sil-opt -module-name Swift -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 %s -o /dev/null 2>&1 | %FileCheck %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This file is meant to contain dataflow tests that are true leaks. It is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all=0 -module-name ObjectiveC -o /dev/null 2>&1 %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all=0 -module-name ObjectiveC -o /dev/null 2>&1 %s
|
||||
// REQUIRES: asserts
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-opaque-values -verify-sil-ownership -enable-sil-verify-all=0 -module-name Swift -o /dev/null 2>&1 %s
|
||||
// RUN: %target-sil-opt -enable-sil-opaque-values -enable-sil-verify-all=0 -module-name Swift -o /dev/null 2>&1 %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This file is meant to contain tests that previously the verifier treated
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 -o /dev/null 2>&1 %s | %FileCheck %s
|
||||
// RUN: %target-sil-opt -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 -o /dev/null 2>&1 %s | %FileCheck %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all=0 -module-name Swift -o /dev/null 2>&1 %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all=0 -module-name Swift -o /dev/null 2>&1 %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This file is meant to contain tests that previously the verifier treated
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 -o /dev/null 2>&1 %s | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 -o /dev/null 2>&1 %s | %FileCheck -check-prefix=NEGATIVE-TEST %s
|
||||
// RUN: %target-sil-opt -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 -o /dev/null 2>&1 %s | %FileCheck %s
|
||||
// RUN: %target-sil-opt -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 -o /dev/null 2>&1 %s | %FileCheck -check-prefix=NEGATIVE-TEST %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all=0 -module-name Swift -o /dev/null %s 2>&1
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all=0 -module-name Swift -o /dev/null %s 2>&1
|
||||
// REQUIRES: asserts
|
||||
|
||||
// Make sure that we properly handle unreachable code the likes of which come
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-objc-interop -verify-sil-ownership -enable-sil-verify-all=0 -module-name Swift -o /dev/null 2>&1 %s
|
||||
// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all=0 -module-name Swift -o /dev/null 2>&1 %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This file is meant to contain tests that previously the verifier treated
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -parse-stdlib %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership -parse-stdlib %s | %FileCheck %s -check-prefix=SILGEN
|
||||
// RUN: %target-swift-emit-ir -verify-sil-ownership -parse-stdlib %s
|
||||
// RUN: %target-swift-emit-sil -parse-stdlib %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -parse-stdlib %s | %FileCheck %s -check-prefix=SILGEN
|
||||
// RUN: %target-swift-emit-ir -parse-stdlib %s
|
||||
|
||||
// This test includes some calls to transparent stdlib functions.
|
||||
// We pattern match for the absence of access markers in the inlined code.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership -parse-stdlib %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -Onone -parse-stdlib %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck -check-prefix=CANONICAL %s
|
||||
// RUN: %target-swift-emit-silgen -parse-stdlib %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -Onone -parse-stdlib %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck -check-prefix=CANONICAL %s
|
||||
|
||||
import Swift
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -module-name foo -verify-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name foo -verify-sil-ownership -verify %s
|
||||
// RUN: %target-swift-emit-silgen -module-name foo %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name foo -verify %s
|
||||
|
||||
// CHECK-LABEL: sil [ossa] @main
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -module-name foo -verify-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name foo -verify-sil-ownership -verify %s
|
||||
// RUN: %target-swift-emit-silgen -module-name foo %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name foo -verify %s
|
||||
|
||||
// CHECK-LABEL: sil [ossa] @main
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership -parse-stdlib -primary-file %s | %FileCheck %s -check-prefix=RAW
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -assert-config Debug -parse-stdlib -primary-file %s | %FileCheck -check-prefix=DEBUG %s
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -O -assert-config Debug -parse-stdlib -primary-file %s | %FileCheck -check-prefix=DEBUG %s
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -assert-config Release -parse-stdlib -primary-file %s | %FileCheck -check-prefix=RELEASE %s
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -O -assert-config Release -parse-stdlib -primary-file %s | %FileCheck -check-prefix=RELEASE %s
|
||||
// RUN: %target-swift-emit-silgen -parse-stdlib -primary-file %s | %FileCheck %s -check-prefix=RAW
|
||||
// RUN: %target-swift-emit-sil -assert-config Debug -parse-stdlib -primary-file %s | %FileCheck -check-prefix=DEBUG %s
|
||||
// RUN: %target-swift-emit-sil -O -assert-config Debug -parse-stdlib -primary-file %s | %FileCheck -check-prefix=DEBUG %s
|
||||
// RUN: %target-swift-emit-sil -assert-config Release -parse-stdlib -primary-file %s | %FileCheck -check-prefix=RELEASE %s
|
||||
// RUN: %target-swift-emit-sil -O -assert-config Release -parse-stdlib -primary-file %s | %FileCheck -check-prefix=RELEASE %s
|
||||
|
||||
import Swift
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -emit-module-path %t/default_arguments_other.swiftmodule -emit-module -swift-version 4 -primary-file %S/Inputs/default_arguments_other.swift
|
||||
|
||||
// RUN: %target-swift-emit-silgen -module-name default_arguments_serialized -Xllvm -sil-full-demangle -verify-sil-ownership -swift-version 4 -I %t %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -module-name default_arguments_serialized -Xllvm -sil-full-demangle -swift-version 4 -I %t %s | %FileCheck %s
|
||||
|
||||
// RUN: %target-swift-emit-sil -module-name default_arguments_serialized -Xllvm -sil-full-demangle -verify-sil-ownership -O -swift-version 4 -I %t %s | %FileCheck %s --check-prefix=OPT
|
||||
// RUN: %target-swift-emit-sil -module-name default_arguments_serialized -Xllvm -sil-full-demangle -O -swift-version 4 -I %t %s | %FileCheck %s --check-prefix=OPT
|
||||
|
||||
// Check that default arguments are serialized in Swift 4 mode.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-silgen -module-name default_arguments -Xllvm -sil-full-demangle -verify-sil-ownership -swift-version 4 %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -module-name default_arguments -Xllvm -sil-full-demangle -swift-version 4 %s | %FileCheck %s
|
||||
|
||||
protocol DefaultInitializable {
|
||||
init()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership -verify %s
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership %s | %FileCheck --check-prefix=AFTER-MANDATORY-PASSES %s
|
||||
// RUN: %target-swift-emit-silgen -verify %s
|
||||
// RUN: %target-swift-emit-sil %s | %FileCheck --check-prefix=AFTER-MANDATORY-PASSES %s
|
||||
|
||||
// ensure escape analysis killed the box allocations used for delayed Self
|
||||
// return buffers
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
// RUN: %target-swift-emit-silgen -module-name function_conversion -verify-sil-ownership -primary-file %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name function_conversion -verify-sil-ownership -primary-file %s
|
||||
// RUN: %target-swift-emit-silgen -module-name function_conversion -primary-file %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name function_conversion -primary-file %s
|
||||
|
||||
// Check SILGen against various FunctionConversionExprs emitted by Sema.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership %s -o /dev/null -verify
|
||||
// RUN: %target-swift-emit-sil %s -o /dev/null -verify
|
||||
|
||||
//===--- Function declaration with uninhabited parameter type
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
// RUN: %target-swift-emit-silgen -module-name generic_witness -verify-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name generic_witness -verify-sil-ownership %s
|
||||
// RUN: %target-swift-emit-silgen -module-name generic_witness %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name generic_witness %s
|
||||
|
||||
protocol Runcible {
|
||||
func runce<A>(_ x: A)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -verify-sil-ownership %S/../Inputs/resilient_struct.swift
|
||||
// RUN: %target-swift-emit-silgen -I %t -verify-sil-ownership -enable-library-evolution %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule %S/../Inputs/resilient_struct.swift
|
||||
// RUN: %target-swift-emit-silgen -I %t -enable-library-evolution %s | %FileCheck %s
|
||||
|
||||
import resilient_struct
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership -enable-library-evolution %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -enable-library-evolution %s | %FileCheck %s
|
||||
|
||||
// RUN: %target-swift-frontend -emit-ir %s
|
||||
// RUN: %target-swift-frontend -emit-ir -enable-library-evolution %s
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -parse-as-library -verify-sil-ownership %s -verify | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -parse-as-library -verify-sil-ownership %s
|
||||
// RUN: %target-swift-emit-silgen -parse-as-library %s -verify | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -parse-as-library %s
|
||||
|
||||
func function1() {
|
||||
return
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
// RUN: %target-swift-emit-silgen -module-name nested_generics -verify-sil-ownership -Xllvm -sil-full-demangle -parse-as-library %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name nested_generics -verify-sil-ownership -Xllvm -sil-full-demangle -parse-as-library %s > /dev/null
|
||||
// RUN: %target-swift-emit-sil -module-name nested_generics -verify-sil-ownership -Xllvm -sil-full-demangle -O -parse-as-library %s > /dev/null
|
||||
// RUN: %target-swift-emit-ir -module-name nested_generics -verify-sil-ownership -Xllvm -sil-full-demangle -parse-as-library %s > /dev/null
|
||||
// RUN: %target-swift-emit-silgen -module-name nested_generics -Xllvm -sil-full-demangle -parse-as-library %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name nested_generics -Xllvm -sil-full-demangle -parse-as-library %s > /dev/null
|
||||
// RUN: %target-swift-emit-sil -module-name nested_generics -Xllvm -sil-full-demangle -O -parse-as-library %s > /dev/null
|
||||
// RUN: %target-swift-emit-ir -module-name nested_generics -Xllvm -sil-full-demangle -parse-as-library %s > /dev/null
|
||||
|
||||
// TODO:
|
||||
// - test generated SIL -- mostly we're just testing mangling here
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %build-silgen-test-overlays
|
||||
// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk -I %t) -module-name newtype -I %S/Inputs -I %S/Inputs -I %S/../IDE/Inputs/custom-modules -verify-sil-ownership -enable-objc-interop -enable-source-import %s | %FileCheck %s -check-prefix=CHECK-RAW
|
||||
// RUN: %target-swift-emit-sil(mock-sdk: %clang-importer-sdk -I %t) -module-name newtype -I %S/Inputs -I %S/Inputs -I %S/../IDE/Inputs/custom-modules -verify-sil-ownership -enable-objc-interop -enable-source-import %s | %FileCheck %s -check-prefix=CHECK-CANONICAL
|
||||
// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk -I %t) -module-name newtype -I %S/Inputs -I %S/Inputs -I %S/../IDE/Inputs/custom-modules -enable-objc-interop -enable-source-import %s | %FileCheck %s -check-prefix=CHECK-RAW
|
||||
// RUN: %target-swift-emit-sil(mock-sdk: %clang-importer-sdk -I %t) -module-name newtype -I %S/Inputs -I %S/Inputs -I %S/../IDE/Inputs/custom-modules -enable-objc-interop -enable-source-import %s | %FileCheck %s -check-prefix=CHECK-CANONICAL
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -verify-sil-ownership -import-objc-header %S/Inputs/objc_block_to_func_to_block.h -emit-silgen -verify %s
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -import-objc-header %S/Inputs/objc_block_to_func_to_block.h -emit-silgen -verify %s
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
import Foundation
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) %s -enable-objc-interop -import-objc-header %S/Inputs/objc_bridged_generic_conformance.h -verify -verify-sil-ownership
|
||||
// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) %s -enable-objc-interop -import-objc-header %S/Inputs/objc_bridged_generic_conformance.h -verify
|
||||
|
||||
protocol P { func test() }
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %build-silgen-test-overlays
|
||||
// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -Xllvm -sil-full-demangle %s -verify-sil-ownership
|
||||
// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -Xllvm -sil-full-demangle %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %build-silgen-test-overlays
|
||||
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -verify-sil-ownership -emit-module -o %t -I %S/../Inputs/ObjCBridging %S/../Inputs/ObjCBridging/Appliances.swift -I %t
|
||||
// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -I %S/../Inputs/ObjCBridging -disable-swift-bridge-attr -Xllvm -sil-full-demangle %s -verify-sil-ownership | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-cpu --check-prefix=CHECK-%target-os-%target-cpu
|
||||
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -emit-module -o %t -I %S/../Inputs/ObjCBridging %S/../Inputs/ObjCBridging/Appliances.swift -I %t
|
||||
// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -I %S/../Inputs/ObjCBridging -disable-swift-bridge-attr -Xllvm -sil-full-demangle %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-cpu --check-prefix=CHECK-%target-os-%target-cpu
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -I %t -module-name SomeModule -emit-module -emit-module-path=%t/SomeModule.swiftmodule %S/Inputs/objc_dynamic_replacement.swift -enable-private-imports -swift-version 5 -enable-implicit-dynamic
|
||||
// RUN: %target-swift-emit-silgen -I %t -verify-sil-ownership %s -swift-version 5 | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -I %t %s -swift-version 5 | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop | %FileCheck %s
|
||||
|
||||
import ObjectiveC
|
||||
import Foundation
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
// RUN: %target-swift-emit-silgen -module-name partial_apply_protocol -verify-sil-ownership -primary-file %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name partial_apply_protocol -verify-sil-ownership -primary-file %s
|
||||
// RUN: %target-swift-emit-silgen -module-name partial_apply_protocol -primary-file %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name partial_apply_protocol -primary-file %s
|
||||
|
||||
protocol Clonable {
|
||||
func clone() -> Self
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// RUN: %target-swift-emit-silgen -I %t -primary-file %s %S/private_import_other.swift -module-name main -swift-version 5 | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -I %t %s %S/private_import_other.swift -module-name main -swift-version 5 | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -I %t %S/private_import_other.swift %s -module-name main -swift-version 5 | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -verify-sil-ownership -I %t -primary-file %s %S/private_import_other.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -verify-sil-ownership -I %t -O -primary-file %s %S/private_import_other.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -I %t -primary-file %s %S/private_import_other.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -I %t -O -primary-file %s %S/private_import_other.swift -module-name main -o /dev/null
|
||||
|
||||
|
||||
@_private(sourceFile: "private_import_module.swift") import Mod
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// RUN: %target-swift-emit-silgen -I %t -primary-file %s %S/private_import.swift -module-name main -swift-version 5 | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -I %t %s %S/private_import.swift -module-name main -swift-version 5 | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -I %t %S/private_import.swift %s -module-name main -swift-version 5 | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -verify-sil-ownership -I %t -primary-file %s %S/private_import.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -verify-sil-ownership -I %t -O -primary-file %s %S/private_import.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -I %t -primary-file %s %S/private_import.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -I %t -O -primary-file %s %S/private_import.swift -module-name main -o /dev/null
|
||||
|
||||
@_private(sourceFile: "private_import_module.swift") import Mod
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-silgen %s -enable-objc-interop -disable-objc-attr-requires-foundation-module -verify-sil-ownership
|
||||
// RUN: %target-swift-emit-silgen %s -enable-objc-interop -disable-objc-attr-requires-foundation-module
|
||||
|
||||
@objc protocol Unrelated {}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -module-name protocol_resilience -emit-module -enable-library-evolution -emit-module-path=%t/resilient_protocol.swiftmodule -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift
|
||||
// RUN: %target-swift-emit-silgen -module-name protocol_resilience -I %t -verify-sil-ownership -enable-library-evolution %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -module-name protocol_resilience -I %t -enable-library-evolution %s | %FileCheck %s
|
||||
|
||||
import resilient_protocol
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership -module-name protocol_with_superclass %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -module-name protocol_with_superclass %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend -emit-ir %s
|
||||
|
||||
// Protocols with superclass-constrained Self, written using a 'where' clause.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
// RUN: %target-swift-emit-silgen -module-name reabstract -Xllvm -sil-full-demangle -verify-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name reabstract -Xllvm -sil-full-demangle -verify-sil-ownership %s | %FileCheck %s --check-prefix=MANDATORY
|
||||
// RUN: %target-swift-emit-silgen -module-name reabstract -Xllvm -sil-full-demangle %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name reabstract -Xllvm -sil-full-demangle %s | %FileCheck %s --check-prefix=MANDATORY
|
||||
|
||||
func takeFn<T>(_ f : (T) -> T?) {}
|
||||
func liftOptional(_ x : Int) -> Int? { return x }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
// RUN: %target-swift-emit-sil -module-name rethrows -verify-sil-ownership -verify %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name rethrows -verify %s | %FileCheck %s
|
||||
|
||||
@discardableResult
|
||||
func rethrower(_ fn: () throws -> Int) rethrows -> Int {
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -emit-module %S/Inputs/TestableMultifileHelper.swift -enable-testing -o %t
|
||||
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership -I %t %s %S/testable-multifile.swift -module-name main | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership -I %t %S/testable-multifile.swift %s -module-name main | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership -I %t -primary-file %s %S/testable-multifile.swift -module-name main | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -I %t %s %S/testable-multifile.swift -module-name main | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -I %t %S/testable-multifile.swift %s -module-name main | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -I %t -primary-file %s %S/testable-multifile.swift -module-name main | %FileCheck %s
|
||||
|
||||
// Just make sure we don't crash later on.
|
||||
// RUN: %target-swift-emit-ir -verify-sil-ownership -I %t -primary-file %s %S/testable-multifile.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -verify-sil-ownership -I %t -O -primary-file %s %S/testable-multifile.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -I %t -primary-file %s %S/testable-multifile.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -I %t -O -primary-file %s %S/testable-multifile.swift -module-name main -o /dev/null
|
||||
|
||||
@testable import TestableMultifileHelper
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
// RUN: %target-swift-emit-silgen -I %t -primary-file %s %S/testable-multifile-other.swift -module-name main | %FileCheck %s
|
||||
|
||||
// Just make sure we don't crash later on.
|
||||
// RUN: %target-swift-emit-ir -verify-sil-ownership -I %t -primary-file %s %S/testable-multifile-other.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -verify-sil-ownership -I %t -O -primary-file %s %S/testable-multifile-other.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -I %t -primary-file %s %S/testable-multifile-other.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -I %t -O -primary-file %s %S/testable-multifile-other.swift -module-name main -o /dev/null
|
||||
|
||||
@testable import TestableMultifileHelper
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
// RUN: %target-swift-emit-sil -module-name unmanaged -verify-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name unmanaged %s | %FileCheck %s
|
||||
|
||||
class C {}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership %s -o /dev/null -verify
|
||||
// RUN: %target-swift-emit-sil %s -o /dev/null -verify
|
||||
|
||||
func testUnreachableAfterReturn() -> Int {
|
||||
var x: Int = 3
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -verify %s
|
||||
// RUN: %target-swift-emit-silgen %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -verify %s
|
||||
|
||||
protocol BestFriend: class {
|
||||
init()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -emit-module-path %t/witness_accessibility_other.swiftmodule %S/Inputs/witness_accessibility_other.swift
|
||||
// RUN: %target-swift-emit-silgen -I %t -verify-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -I %t -verify-sil-ownership %s
|
||||
// RUN: %target-swift-emit-silgen -I %t %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -I %t %s
|
||||
|
||||
import witness_accessibility_other
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
// RUN: %target-swift-emit-silgen -module-name witness_same_type -verify-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name witness_same_type -verify-sil-ownership %s
|
||||
// RUN: %target-swift-emit-silgen -module-name witness_same_type %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name witness_same_type %s
|
||||
|
||||
protocol Fooable {
|
||||
associatedtype Bar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -access-enforcement-selection -enforce-exclusivity=checked %s | %FileCheck %s
|
||||
// RUN: %target-sil-opt -access-enforcement-selection -enforce-exclusivity=checked %s | %FileCheck %s
|
||||
|
||||
import Builtin
|
||||
import Swift
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt %s -verify-sil-ownership -access-summary-dump -o /dev/null | %FileCheck %s
|
||||
// RUN: %target-sil-opt %s -access-summary-dump -o /dev/null | %FileCheck %s
|
||||
|
||||
sil_stage raw
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -allocbox-to-stack | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -allocbox-to-stack | %FileCheck %s
|
||||
|
||||
import Builtin
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -capture-promotion -verify-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -capture-promotion | %FileCheck %s
|
||||
|
||||
// Check to make sure that the process of promoting closure captures results in
|
||||
// a correctly cloned and modified closure function body. This test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -diagnostic-constant-propagation | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -performance-constant-propagation | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -diagnostic-constant-propagation | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -performance-constant-propagation | %FileCheck %s
|
||||
|
||||
import Swift
|
||||
import Builtin
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -copy-propagation -verify-sil-ownership -enable-sil-opaque-values -enable-sil-verify-all %s | %FileCheck %s
|
||||
// RUN: %target-sil-opt -copy-propagation -enable-sil-opaque-values -enable-sil-verify-all %s | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering | %FileCheck %s
|
||||
|
||||
// These are all regression tests to ensure that the memory promotion pass
|
||||
// doesn't crash.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swiftc_driver -emit-sil %s -o /dev/null -Xfrontend -verify
|
||||
// RUN: %target-swiftc_driver -Xfrontend -disable-sil-ownership-verifier -emit-sil %s -o /dev/null -Xfrontend -verify
|
||||
|
||||
// TODO: Change this back to using target-swift-frontend once we move errors to
|
||||
// type checker and SILGen.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering -verify | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering -verify | %FileCheck %s
|
||||
|
||||
// This test only tests mark_uninitialized [delegatingself]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering -verify | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering -verify | %FileCheck %s
|
||||
|
||||
// This test only tests mark_uninitialized [derivedself]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering -verify | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering -verify | %FileCheck %s
|
||||
|
||||
// This file tests mark_uninitialized [rootself]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -definite-init -verify | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -definite-init -verify | %FileCheck %s
|
||||
|
||||
// This file contains tests that test diagnostics emitted for var initialization
|
||||
// by DI.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/../ClangImporter/Inputs/custom-modules %s -emit-sil -verify-sil-ownership
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/../ClangImporter/Inputs/custom-modules %s -emit-sil
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/../IDE/Inputs/custom-modules %s -emit-sil -verify-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/../IDE/Inputs/custom-modules %s -emit-sil | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering | %FileCheck %s
|
||||
//
|
||||
// Make sure that we properly scalarize tuples.
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-objc-interop -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-objc-interop -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -sil-combine -devirtualizer -dce | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine -devirtualizer -dce | %FileCheck %s
|
||||
|
||||
// REQUIRES: SR9831
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -devirtualizer -enable-library-evolution | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer -enable-library-evolution | %FileCheck %s
|
||||
sil_stage canonical
|
||||
|
||||
import Builtin
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -devirtualizer -inline | %FileCheck %s --check-prefix=CHECK-DEVIRT
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s --check-prefix=CHECK-MANDATORY-INLINING
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer -inline | %FileCheck %s --check-prefix=CHECK-DEVIRT
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s --check-prefix=CHECK-MANDATORY-INLINING
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -devirtualizer -dce | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer -dce | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %/s -devirtualizer -dce -save-optimization-record-path=%t.yaml | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %/s -devirtualizer -dce -save-optimization-record-path=%t.yaml | %FileCheck %s
|
||||
// RUN: %FileCheck -check-prefix=YAML -input-file=%t.yaml %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -diagnose-unreachable -sil-print-debuginfo | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -diagnose-unreachable -sil-print-debuginfo | %FileCheck %s
|
||||
|
||||
import Builtin
|
||||
import Swift
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -inline -verify %s | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -mandatory-inlining -verify %s | %FileCheck %s
|
||||
// RUN: %target-sil-opt -inline -verify %s | %FileCheck %s
|
||||
// RUN: %target-sil-opt -mandatory-inlining -verify %s | %FileCheck %s
|
||||
|
||||
import Builtin
|
||||
import Swift
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining -verify-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
|
||||
|
||||
sil_stage raw
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining -verify-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining -verify-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
|
||||
|
||||
sil_stage raw
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-objc-interop -module-name mandatory_inlining -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-objc-interop -module-name mandatory_inlining -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
|
||||
|
||||
import Builtin
|
||||
import Swift
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
|
||||
|
||||
sil_stage raw
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user