mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ownership] Rename enable-sil-ownership => verify-sil-ownership.
I have been meaning to do this change for a minute, but kept on putting it off. This describes what is actually happening and is a better name for the option.
This commit is contained in:
@@ -327,10 +327,6 @@ option(SWIFT_STDLIB_USE_NONATOMIC_RC
|
||||
"Build the standard libraries and overlays with nonatomic reference count operations enabled"
|
||||
FALSE)
|
||||
|
||||
option(SWIFT_STDLIB_ENABLE_SIL_OWNERSHIP
|
||||
"Build the standard libraries and overlays with sil ownership enabled."
|
||||
FALSE)
|
||||
|
||||
option(SWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS
|
||||
"Enable runtime function counters and expose the API."
|
||||
FALSE)
|
||||
|
||||
@@ -314,7 +314,7 @@ function (swift_benchmark_compile_archopts)
|
||||
|
||||
set(common_options
|
||||
"-c"
|
||||
"-Xfrontend" "-enable-sil-ownership"
|
||||
"-Xfrontend" "-verify-sil-ownership"
|
||||
"-target" "${target}"
|
||||
"-${BENCH_COMPILE_ARCHOPTS_OPT}" ${PAGE_ALIGNMENT_OPTION})
|
||||
|
||||
@@ -344,7 +344,7 @@ function (swift_benchmark_compile_archopts)
|
||||
|
||||
set(common_options_driver
|
||||
"-c"
|
||||
"-Xfrontend" "-enable-sil-ownership"
|
||||
"-Xfrontend" "-verify-sil-ownership"
|
||||
"-target" "${target}"
|
||||
"-${driver_opt}")
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ function(_compile_swift_files
|
||||
endif()
|
||||
|
||||
if(SWIFTFILE_IS_STDLIB)
|
||||
list(APPEND swift_flags "-Xfrontend" "-enable-sil-ownership")
|
||||
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 EnableSILOwnership = false;
|
||||
bool VerifySILOwnership = false;
|
||||
|
||||
/// 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 enable_sil_ownership : Flag<["-"], "enable-sil-ownership">,
|
||||
HelpText<"Enable the SIL Ownership Model">;
|
||||
def verify_sil_ownership : Flag<["-"], "verify-sil-ownership">,
|
||||
HelpText<"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.EnableSILOwnership |= Args.hasArg(OPT_enable_sil_ownership);
|
||||
Opts.VerifySILOwnership |= Args.hasArg(OPT_verify_sil_ownership);
|
||||
Opts.EnableMandatorySemanticARCOpts |=
|
||||
Args.hasArg(OPT_enable_mandatory_semantic_arc_opts);
|
||||
Opts.EnableLargeLoadableTypes |= Args.hasArg(OPT_enable_large_loadable_types);
|
||||
|
||||
@@ -630,7 +630,7 @@ void SILInstruction::verifyOperandOwnership() const {
|
||||
return;
|
||||
|
||||
// If SILOwnership is not enabled, do not perform verification.
|
||||
if (!getModule().getOptions().EnableSILOwnership)
|
||||
if (!getModule().getOptions().VerifySILOwnership)
|
||||
return;
|
||||
|
||||
// If the given function has unqualified ownership or we have been asked by
|
||||
|
||||
@@ -429,7 +429,7 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
|
||||
void operator=(const SILVerifier&) = delete;
|
||||
public:
|
||||
bool isSILOwnershipEnabled() const {
|
||||
return F.getModule().getOptions().EnableSILOwnership;
|
||||
return F.getModule().getOptions().VerifySILOwnership;
|
||||
}
|
||||
|
||||
void _require(bool condition, const Twine &complaint,
|
||||
|
||||
@@ -223,7 +223,7 @@ ValueOwnershipKindClassifier::visitForwardingInst(SILInstruction *i,
|
||||
// If we have mismatched SILOwnership and sil ownership is not enabled,
|
||||
// just return Any for staging purposes. If SILOwnership is enabled, then
|
||||
// we must assert!
|
||||
if (!i->getModule().getOptions().EnableSILOwnership) {
|
||||
if (!i->getModule().getOptions().VerifySILOwnership) {
|
||||
return ValueOwnershipKind::Any;
|
||||
}
|
||||
llvm_unreachable("Forwarding inst with mismatching ownership kinds?!");
|
||||
|
||||
@@ -378,7 +378,7 @@ struct SemanticARCOpts : SILFunctionTransform {
|
||||
SILFunction &f = *getFunction();
|
||||
|
||||
// Make sure we are running with ownership verification enabled.
|
||||
assert(f.getModule().getOptions().EnableSILOwnership &&
|
||||
assert(f.getModule().getOptions().VerifySILOwnership &&
|
||||
"Can not perform semantic arc optimization unless ownership "
|
||||
"verification is enabled");
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -module-name optional -I %S/Inputs/custom-modules -enable-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 -verify-sil-ownership -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 -enable-sil-ownership -emit-ir | %FileCheck %s
|
||||
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -verify-sil-ownership -emit-ir | %FileCheck %s
|
||||
|
||||
// REQUIRES: CPU=x86_64
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
@@ -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 -enable-sil-ownership | \
|
||||
// RUN: -Xfrontend -verify-sil-ownership | \
|
||||
// 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 -enable-sil-ownership | \
|
||||
// RUN: -Xfrontend -verify-sil-ownership | \
|
||||
// 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) -enable-sil-ownership -emit-module -o %t %s -disable-objc-attr-requires-foundation-module
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-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) -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: %FileCheck %s < %t/blocks.h
|
||||
// RUN: %check-in-clang %t/blocks.h
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-build-swift %s -Xfrontend -enable-sil-ownership -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_switchenum -o %t/main
|
||||
// RUN: %target-build-swift %s -Xfrontend -verify-sil-ownership -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 -enable-sil-ownership %s | %target-sil-opt -enable-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership %s | %target-sil-opt -verify-sil-ownership | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership %s | %target-sil-opt -enable-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership %s | %target-sil-opt -verify-sil-ownership | %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 -enable-sil-ownership %s -emit-sib -o %t/tmp.sib -module-name borrow
|
||||
// RUN: %target-sil-opt -enable-sil-ownership %t/tmp.sib -o %t/tmp.2.sib -module-name borrow
|
||||
// RUN: %target-sil-opt -enable-sil-ownership %t/tmp.2.sib -module-name borrow | %FileCheck %s
|
||||
// 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
|
||||
|
||||
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 -enable-sil-ownership %s -emit-sib -o %t/tmp.sib -module-name literals
|
||||
// RUN: %target-sil-opt -enable-sil-ownership %t/tmp.sib -o %t/tmp.2.sib -module-name literals
|
||||
// RUN: %target-sil-opt -enable-sil-ownership %t/tmp.2.sib -module-name literals | %FileCheck %s
|
||||
// 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
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -module-name Swift -sil-ownership-verifier-enable-testing -enable-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 -verify-sil-ownership -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 -enable-sil-ownership -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 %s -o /dev/null 2>&1 | %FileCheck %s
|
||||
// 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
|
||||
// REQUIRES: asserts
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all=0 %s -o /dev/null
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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 -enable-sil-ownership -enable-sil-verify-all=0 -o /dev/null 2>&1 %s
|
||||
// RUN: %target-sil-opt -module-name Swift -verify-sil-ownership -enable-sil-verify-all=0 -o /dev/null 2>&1 %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
sil_stage raw
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 %s -o /dev/null 2>&1 | %FileCheck %s
|
||||
// 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
|
||||
// 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 -enable-sil-ownership -enable-sil-verify-all=0 -o /dev/null 2>&1 %s
|
||||
// RUN: %target-sil-opt -module-name Swift -verify-sil-ownership -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 -enable-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 -verify-sil-ownership -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 -enable-sil-ownership -enable-sil-verify-all=0 -module-name ObjectiveC -o /dev/null 2>&1 %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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 -enable-sil-ownership -enable-sil-verify-all=0 -module-name Swift -o /dev/null 2>&1 %s
|
||||
// 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
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This file is meant to contain tests that previously the verifier treated
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-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 %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all=0 -module-name Swift -o /dev/null 2>&1 %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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 -enable-sil-ownership -sil-ownership-verifier-enable-testing -enable-sil-verify-all=0 -o /dev/null 2>&1 %s | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-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 -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
|
||||
// REQUIRES: asserts
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all=0 -module-name Swift -o /dev/null %s 2>&1
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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 -enable-sil-ownership -enable-sil-verify-all=0 -module-name Swift -o /dev/null 2>&1 %s
|
||||
// RUN: %target-sil-opt -enable-objc-interop -verify-sil-ownership -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 -enable-sil-ownership -parse-stdlib %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-stdlib %s | %FileCheck %s -check-prefix=SILGEN
|
||||
// RUN: %target-swift-emit-ir -enable-sil-ownership -parse-stdlib %s
|
||||
// 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
|
||||
|
||||
// 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 -enable-sil-ownership -parse-stdlib %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -enable-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 -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
|
||||
|
||||
import Swift
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -module-name foo -enable-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name foo -enable-sil-ownership -verify %s
|
||||
// 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
|
||||
|
||||
// CHECK-LABEL: sil [ossa] @main
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -module-name foo -enable-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name foo -enable-sil-ownership -verify %s
|
||||
// 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
|
||||
|
||||
// CHECK-LABEL: sil [ossa] @main
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-stdlib -primary-file %s | %FileCheck %s -check-prefix=RAW
|
||||
// RUN: %target-swift-emit-sil -enable-sil-ownership -assert-config Debug -parse-stdlib -primary-file %s | %FileCheck -check-prefix=DEBUG %s
|
||||
// RUN: %target-swift-emit-sil -enable-sil-ownership -O -assert-config Debug -parse-stdlib -primary-file %s | %FileCheck -check-prefix=DEBUG %s
|
||||
// RUN: %target-swift-emit-sil -enable-sil-ownership -assert-config Release -parse-stdlib -primary-file %s | %FileCheck -check-prefix=RELEASE %s
|
||||
// RUN: %target-swift-emit-sil -enable-sil-ownership -O -assert-config Release -parse-stdlib -primary-file %s | %FileCheck -check-prefix=RELEASE %s
|
||||
// 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
|
||||
|
||||
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 -enable-sil-ownership -swift-version 4 -I %t %s | %FileCheck %s
|
||||
// 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-sil -module-name default_arguments_serialized -Xllvm -sil-full-demangle -enable-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 -verify-sil-ownership -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 -enable-sil-ownership -swift-version 4 %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -module-name default_arguments -Xllvm -sil-full-demangle -verify-sil-ownership -swift-version 4 %s | %FileCheck %s
|
||||
|
||||
protocol DefaultInitializable {
|
||||
init()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -enable-sil-ownership -verify %s
|
||||
// RUN: %target-swift-emit-sil -enable-sil-ownership %s | %FileCheck --check-prefix=AFTER-MANDATORY-PASSES %s
|
||||
// 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
|
||||
|
||||
// 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 -enable-sil-ownership -primary-file %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name function_conversion -enable-sil-ownership -primary-file %s
|
||||
// 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
|
||||
|
||||
// Check SILGen against various FunctionConversionExprs emitted by Sema.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-sil -enable-sil-ownership %s -o /dev/null -verify
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership %s -o /dev/null -verify
|
||||
|
||||
//===--- Function declaration with uninhabited parameter type
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
// RUN: %target-swift-emit-silgen -module-name generic_witness -enable-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name generic_witness -enable-sil-ownership %s
|
||||
// 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
|
||||
|
||||
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 -enable-sil-ownership %S/../Inputs/resilient_struct.swift
|
||||
// RUN: %target-swift-emit-silgen -I %t -enable-sil-ownership -enable-library-evolution %s | %FileCheck %s
|
||||
// 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
|
||||
|
||||
import resilient_struct
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -enable-sil-ownership -enable-library-evolution %s | %FileCheck %s
|
||||
// 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-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 -enable-sil-ownership %s -verify | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -parse-as-library -enable-sil-ownership %s
|
||||
// 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
|
||||
|
||||
func function1() {
|
||||
return
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
// RUN: %target-swift-emit-silgen -module-name nested_generics -enable-sil-ownership -Xllvm -sil-full-demangle -parse-as-library %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name nested_generics -enable-sil-ownership -Xllvm -sil-full-demangle -parse-as-library %s > /dev/null
|
||||
// RUN: %target-swift-emit-sil -module-name nested_generics -enable-sil-ownership -Xllvm -sil-full-demangle -O -parse-as-library %s > /dev/null
|
||||
// RUN: %target-swift-emit-ir -module-name nested_generics -enable-sil-ownership -Xllvm -sil-full-demangle -parse-as-library %s > /dev/null
|
||||
// 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
|
||||
|
||||
// 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 -enable-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 -enable-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 -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
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-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) -verify-sil-ownership -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 -enable-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 -verify-sil-ownership
|
||||
|
||||
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 -enable-sil-ownership
|
||||
// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -Xllvm -sil-full-demangle %s -verify-sil-ownership
|
||||
|
||||
// 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) -enable-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 -enable-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) -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
|
||||
|
||||
// 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 -enable-sil-ownership %s -swift-version 5 | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -I %t -verify-sil-ownership %s -swift-version 5 | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-sil -enable-sil-ownership -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-sil -enable-sil-ownership -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -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 -enable-sil-ownership -primary-file %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name partial_apply_protocol -enable-sil-ownership -primary-file %s
|
||||
// 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
|
||||
|
||||
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 -enable-sil-ownership -I %t -primary-file %s %S/private_import_other.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -enable-sil-ownership -I %t -O -primary-file %s %S/private_import_other.swift -module-name main -o /dev/null
|
||||
// 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
|
||||
|
||||
|
||||
@_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 -enable-sil-ownership -I %t -primary-file %s %S/private_import.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -enable-sil-ownership -I %t -O -primary-file %s %S/private_import.swift -module-name main -o /dev/null
|
||||
// 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
|
||||
|
||||
@_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 -enable-sil-ownership
|
||||
// RUN: %target-swift-emit-silgen %s -enable-objc-interop -disable-objc-attr-requires-foundation-module -verify-sil-ownership
|
||||
|
||||
@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 -enable-sil-ownership -enable-library-evolution %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -module-name protocol_resilience -I %t -verify-sil-ownership -enable-library-evolution %s | %FileCheck %s
|
||||
|
||||
import resilient_protocol
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-silgen -enable-sil-ownership -module-name protocol_with_superclass %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership -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 -enable-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name reabstract -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s --check-prefix=MANDATORY
|
||||
// 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
|
||||
|
||||
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 -enable-sil-ownership -verify %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name rethrows -verify-sil-ownership -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 -enable-sil-ownership -I %t %s %S/testable-multifile.swift -module-name main | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -enable-sil-ownership -I %t %S/testable-multifile.swift %s -module-name main | %FileCheck %s
|
||||
// RUN: %target-swift-emit-silgen -enable-sil-ownership -I %t -primary-file %s %S/testable-multifile.swift -module-name main | %FileCheck %s
|
||||
// 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
|
||||
|
||||
// Just make sure we don't crash later on.
|
||||
// RUN: %target-swift-emit-ir -enable-sil-ownership -I %t -primary-file %s %S/testable-multifile.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -enable-sil-ownership -I %t -O -primary-file %s %S/testable-multifile.swift -module-name main -o /dev/null
|
||||
// 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
|
||||
|
||||
@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 -enable-sil-ownership -I %t -primary-file %s %S/testable-multifile-other.swift -module-name main -o /dev/null
|
||||
// RUN: %target-swift-emit-ir -enable-sil-ownership -I %t -O -primary-file %s %S/testable-multifile-other.swift -module-name main -o /dev/null
|
||||
// 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
|
||||
|
||||
@testable import TestableMultifileHelper
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
// RUN: %target-swift-emit-sil -module-name unmanaged -enable-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name unmanaged -verify-sil-ownership %s | %FileCheck %s
|
||||
|
||||
class C {}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-emit-sil -enable-sil-ownership %s -o /dev/null -verify
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership %s -o /dev/null -verify
|
||||
|
||||
func testUnreachableAfterReturn() -> Int {
|
||||
var x: Int = 3
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -enable-sil-ownership -verify %s
|
||||
// RUN: %target-swift-emit-silgen -verify-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -verify-sil-ownership -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 -enable-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -I %t -enable-sil-ownership %s
|
||||
// RUN: %target-swift-emit-silgen -I %t -verify-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -I %t -verify-sil-ownership %s
|
||||
|
||||
import witness_accessibility_other
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
// RUN: %target-swift-emit-silgen -module-name witness_same_type -enable-sil-ownership %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-ir -module-name witness_same_type -enable-sil-ownership %s
|
||||
// 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
|
||||
|
||||
protocol Fooable {
|
||||
associatedtype Bar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -access-enforcement-selection -enforce-exclusivity=checked %s | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -access-enforcement-selection -enforce-exclusivity=checked %s | %FileCheck %s
|
||||
|
||||
import Builtin
|
||||
import Swift
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt %s -enable-sil-ownership -access-summary-dump -o /dev/null | %FileCheck %s
|
||||
// RUN: %target-sil-opt %s -verify-sil-ownership -access-summary-dump -o /dev/null | %FileCheck %s
|
||||
|
||||
sil_stage raw
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -allocbox-to-stack | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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 -enable-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -capture-promotion -verify-sil-ownership | %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 -enable-sil-ownership -enable-sil-verify-all %s -diagnostic-constant-propagation | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -performance-constant-propagation | %FileCheck %s
|
||||
// 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
|
||||
|
||||
import Swift
|
||||
import Builtin
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -copy-propagation -enable-sil-ownership -enable-sil-opaque-values -enable-sil-verify-all %s | %FileCheck %s
|
||||
// RUN: %target-sil-opt -copy-propagation -verify-sil-ownership -enable-sil-opaque-values -enable-sil-verify-all %s | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering -verify | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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 -enable-sil-ownership -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering -verify | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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 -enable-sil-ownership -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering -verify | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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 -enable-sil-ownership -enable-sil-verify-all %s -definite-init -verify | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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 -enable-sil-ownership
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/../ClangImporter/Inputs/custom-modules %s -emit-sil -verify-sil-ownership
|
||||
|
||||
// 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 -enable-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/../IDE/Inputs/custom-modules %s -emit-sil -verify-sil-ownership | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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 -enable-sil-ownership -enable-objc-interop -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-objc-interop -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-objc-interop -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-objc-interop -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -sil-combine -devirtualizer -dce | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -sil-combine -devirtualizer -dce | %FileCheck %s
|
||||
|
||||
// REQUIRES: SR9831
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -devirtualizer -enable-library-evolution | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -devirtualizer -enable-library-evolution | %FileCheck %s
|
||||
sil_stage canonical
|
||||
|
||||
import Builtin
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -devirtualizer -inline | %FileCheck %s --check-prefix=CHECK-DEVIRT
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s --check-prefix=CHECK-MANDATORY-INLINING
|
||||
// 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
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %s -devirtualizer -dce | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -devirtualizer -dce | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-sil-verify-all %/s -devirtualizer -dce -save-optimization-record-path=%t.yaml | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -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 -enable-sil-ownership -enable-sil-verify-all %s -diagnose-unreachable -sil-print-debuginfo | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-sil-verify-all %s -diagnose-unreachable -sil-print-debuginfo | %FileCheck %s
|
||||
|
||||
import Builtin
|
||||
import Swift
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining -enable-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining -verify-sil-ownership | %FileCheck %s
|
||||
|
||||
sil_stage raw
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining -enable-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining -verify-sil-ownership | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining -enable-sil-ownership | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining -verify-sil-ownership | %FileCheck %s
|
||||
|
||||
sil_stage raw
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-ownership -enable-objc-interop -module-name mandatory_inlining -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
|
||||
// RUN: %target-sil-opt -verify-sil-ownership -enable-objc-interop -module-name mandatory_inlining -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
|
||||
|
||||
import Builtin
|
||||
import Swift
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user