mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #32407 from gottesmm/pr-f0452984219b1947bbe97d25c2a159a16736d090
[ownership] Remove dead option: enable-ownership-stripping-after-serialization.
This commit is contained in:
@@ -161,10 +161,6 @@ public:
|
||||
/// Enable large loadable types IRGen pass.
|
||||
bool EnableLargeLoadableTypes = true;
|
||||
|
||||
/// Should the default pass pipelines strip ownership during the diagnostic
|
||||
/// pipeline or after serialization.
|
||||
bool StripOwnershipAfterSerialization = true;
|
||||
|
||||
/// The name of the file to which the backend should save optimization
|
||||
/// records.
|
||||
std::string OptRecordFile;
|
||||
|
||||
@@ -289,10 +289,6 @@ def disable_sil_partial_apply : Flag<["-"], "disable-sil-partial-apply">,
|
||||
def enable_spec_devirt : Flag<["-"], "enable-spec-devirt">,
|
||||
HelpText<"Enable speculative devirtualization pass.">;
|
||||
|
||||
def enable_ownership_stripping_after_serialization
|
||||
: Flag<["-"], "enable-ownership-stripping-after-serialization">,
|
||||
HelpText<"Strip ownership after serialization">;
|
||||
|
||||
def disable_access_control : Flag<["-"], "disable-access-control">,
|
||||
HelpText<"Don't respect access control restrictions">;
|
||||
def enable_access_control : Flag<["-"], "enable-access-control">,
|
||||
|
||||
@@ -1101,7 +1101,6 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
|
||||
Args.hasArg(OPT_disable_sil_partial_apply);
|
||||
Opts.VerifySILOwnership &= !Args.hasArg(OPT_disable_sil_ownership_verifier);
|
||||
Opts.EnableLargeLoadableTypes |= Args.hasArg(OPT_enable_large_loadable_types);
|
||||
Opts.StripOwnershipAfterSerialization |= Args.hasArg(OPT_enable_ownership_stripping_after_serialization);
|
||||
Opts.EnableDynamicReplacementCanCallPreviousImplementation = !Args.hasArg(
|
||||
OPT_disable_previous_implementation_calls_in_dynamic_replacements);
|
||||
|
||||
|
||||
@@ -124,8 +124,6 @@ static void addMandatoryDiagnosticOptPipeline(SILPassPipelinePlan &P) {
|
||||
if (Options.shouldOptimize()) {
|
||||
P.addDestroyHoisting();
|
||||
}
|
||||
if (!Options.StripOwnershipAfterSerialization)
|
||||
P.addOwnershipModelEliminator();
|
||||
P.addMandatoryInlining();
|
||||
P.addMandatorySILLinker();
|
||||
|
||||
@@ -436,7 +434,6 @@ static void addPerfEarlyModulePassPipeline(SILPassPipelinePlan &P) {
|
||||
P.addDifferentiabilityWitnessDevirtualizer();
|
||||
|
||||
// Strip ownership from non-transparent functions.
|
||||
if (P.getOptions().StripOwnershipAfterSerialization)
|
||||
P.addNonTransparentFunctionOwnershipModelEliminator();
|
||||
|
||||
// Start by linking in referenced functions from other modules.
|
||||
@@ -504,7 +501,6 @@ static void addSerializePipeline(SILPassPipelinePlan &P) {
|
||||
P.addSerializeSILPass();
|
||||
|
||||
// Strip any transparent functions that still have ownership.
|
||||
if (P.getOptions().StripOwnershipAfterSerialization)
|
||||
P.addOwnershipModelEliminator();
|
||||
}
|
||||
|
||||
@@ -758,7 +754,6 @@ SILPassPipelinePlan::getOnonePassPipeline(const SILOptions &Options) {
|
||||
P.addSerializeSILPass();
|
||||
|
||||
// Now strip any transparent functions that still have ownership.
|
||||
if (Options.StripOwnershipAfterSerialization)
|
||||
P.addOwnershipModelEliminator();
|
||||
|
||||
// Finally perform some small transforms.
|
||||
|
||||
@@ -385,7 +385,6 @@ function(_compile_swift_files
|
||||
# The standard library and overlays are always built resiliently.
|
||||
if(SWIFTFILE_IS_STDLIB)
|
||||
list(APPEND swift_flags "-enable-library-evolution")
|
||||
list(APPEND swift_flags "-Xfrontend" "-enable-ownership-stripping-after-serialization")
|
||||
endif()
|
||||
|
||||
if(SWIFT_STDLIB_USE_NONATOMIC_RC)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
// RUN: %target-swift-frontend -emit-sil %s -Onone -Xllvm \
|
||||
// RUN: -sil-print-after=mandatory-inlining \
|
||||
// RUN: -enable-ownership-stripping-after-serialization \
|
||||
// RUN: -Xllvm -sil-print-debuginfo -o /dev/null 2>&1 | %FileCheck %s
|
||||
|
||||
// CHECK: begin_borrow {{.*}} : $OSLog, loc {{.*}}, scope 5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// RUN: %target-swift-emit-silgen -module-name foo %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name foo -verify %s
|
||||
// RUN: %target-swift-frontend -emit-sil -module-name foo -verify %s -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -module-name foo -verify %s
|
||||
|
||||
// CHECK-LABEL: sil [ossa] @main
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// RUN: %target-swift-emit-silgen -module-name foo %s | %FileCheck %s
|
||||
// RUN: %target-swift-emit-sil -module-name foo -verify %s
|
||||
// RUN: %target-swift-frontend -emit-sil -module-name foo -verify %s -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -module-name foo -verify %s
|
||||
|
||||
// CHECK-LABEL: sil [ossa] @main
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-emit-sil -verify %s
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s
|
||||
|
||||
struct Block {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -module-name access_enforcement_noescape -enforce-exclusivity=checked -Onone -emit-sil -swift-version 4 -verify -parse-as-library %s
|
||||
// RUN: %target-swift-frontend -module-name access_enforcement_noescape -enforce-exclusivity=checked -Onone -emit-sil -swift-version 4 -verify -parse-as-library -enable-ownership-stripping-after-serialization %s
|
||||
// RUN: %target-swift-frontend -module-name access_enforcement_noescape -enforce-exclusivity=checked -Onone -emit-sil -swift-version 4 -verify -parse-as-library %s
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This is the subset of tests from access_enforcement_noescape.swift
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -parse-as-library -emit-sil -enforce-exclusivity=checked -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -enable-ownership-stripping-after-serialization -parse-as-library -emit-sil -enforce-exclusivity=checked -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -parse-as-library -emit-sil -enforce-exclusivity=checked -primary-file %s -o /dev/null -verify
|
||||
|
||||
// AccessEnforcementWMO assumes that the only way to address a global or static
|
||||
// property is via a formal begin_access. If we ever allow keypaths for static
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -O -emit-sil %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend -enable-ownership-stripping-after-serialization -O -emit-sil %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend -O -emit-sil %s | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend -enable-ownership-stripping-after-serialization -module-name bridged_casts_folding -O -emit-sil %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend -module-name bridged_casts_folding -O -emit-sil %s | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -O -emit-sil %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=PerfInliner -enable-ownership-stripping-after-serialization -O -emit-sil %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=PerfInliner -O -emit-sil %s | %FileCheck %s
|
||||
|
||||
// We want to check two things here:
|
||||
// - Correctness
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -O -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=PerfInliner -emit-sil %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend -O -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=PerfInliner -enable-ownership-stripping-after-serialization -emit-sil %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend -O -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=PerfInliner -emit-sil %s | %FileCheck %s
|
||||
|
||||
// We want to check two things here:
|
||||
// - Correctness
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -module-name cast_folding_objc_generics -O -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=PerfInliner -emit-sil %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -module-name cast_folding_objc_generics -O -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=PerfInliner -enable-ownership-stripping-after-serialization -emit-sil %s | %FileCheck %s
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -module-name cast_folding_objc_generics -O -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=PerfInliner -emit-sil %s | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -sdk %S/../SILGen/Inputs %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -enable-ownership-stripping-after-serialization -emit-sil -sdk %S/../SILGen/Inputs %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -sdk %S/../SILGen/Inputs %s -o /dev/null -verify
|
||||
|
||||
// <rdar://problem/18213320> enum with raw values that are too big are not diagnosed
|
||||
enum EnumWithTooLargeElements : UInt8 {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s
|
||||
// RUN: %target-swift-frontend -emit-sil -enable-ownership-stripping-after-serialization -verify %s
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s
|
||||
|
||||
func foo<T>(a: Bool, t: T) {
|
||||
let x: T
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -verify -I %t -swift-version 5 %s > /dev/null -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/definite_init_cross_module/BridgingHeader.h
|
||||
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -emit-module -emit-module-path=%t/OtherModule.swiftmodule %S/Inputs/definite_init_cross_module/OtherModule.swift -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -verify -I %t -swift-version 5 %s > /dev/null -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/definite_init_cross_module/BridgingHeader.h -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-module -emit-module-path=%t/OtherModule.swiftmodule %S/Inputs/definite_init_cross_module/OtherModule.swift
|
||||
// RUN: %target-swift-frontend -emit-sil -verify -I %t -swift-version 5 %s > /dev/null -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/definite_init_cross_module/BridgingHeader.h
|
||||
|
||||
import OtherModule
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -verify -verify-ignore-unknown -I %t -swift-version 4 %s > /dev/null -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/definite_init_cross_module/BridgingHeader.h
|
||||
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -enable-ownership-stripping-after-serialization -emit-module -emit-module-path=%t/OtherModule.swiftmodule %S/Inputs/definite_init_cross_module/OtherModule.swift
|
||||
// RUN: %target-swift-frontend -enable-ownership-stripping-after-serialization -emit-sil -verify -verify-ignore-unknown -I %t -swift-version 4 %s > /dev/null -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/definite_init_cross_module/BridgingHeader.h
|
||||
// RUN: %target-swift-frontend -emit-module -emit-module-path=%t/OtherModule.swiftmodule %S/Inputs/definite_init_cross_module/OtherModule.swift
|
||||
// RUN: %target-swift-frontend -emit-sil -verify -verify-ignore-unknown -I %t -swift-version 4 %s > /dev/null -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/definite_init_cross_module/BridgingHeader.h
|
||||
|
||||
import OtherModule
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -enable-ownership-stripping-after-serialization -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
|
||||
import Swift
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -enable-ownership-stripping-after-serialization -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
|
||||
import Swift
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -sdk %S/../SILGen/Inputs %s -I %S/../SILGen/Inputs -enable-source-import -parse-stdlib -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -sdk %S/../SILGen/Inputs %s -I %S/../SILGen/Inputs -enable-source-import -parse-stdlib -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -sdk %S/../SILGen/Inputs %s -I %S/../SILGen/Inputs -enable-source-import -parse-stdlib -o /dev/null -verify
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
import Swift
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s
|
||||
|
||||
// rdar://problem/29716016 - Check that we properly enforce DI on `let`
|
||||
// variables and class properties.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s -o /dev/null
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s -o /dev/null -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s -o /dev/null
|
||||
|
||||
struct S<T> {
|
||||
let t: T // expected-note {{'self.t.1' not initialized}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -disable-objc-attr-requires-foundation-module -verify %s
|
||||
// RUN: %target-swift-frontend -emit-sil -disable-objc-attr-requires-foundation-module -verify %s -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -disable-objc-attr-requires-foundation-module -verify %s
|
||||
|
||||
// High-level tests that DI rejects certain invalid idioms for early
|
||||
// return from initializers.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil %s -parse-as-library -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil %s -parse-as-library -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil %s -parse-as-library -o /dev/null -verify
|
||||
|
||||
var gg: Bool = false
|
||||
var rg: Int = 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -disable-objc-attr-requires-foundation-module -verify %s
|
||||
// RUN: %target-swift-frontend -emit-sil -disable-objc-attr-requires-foundation-module -verify %s -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -disable-objc-attr-requires-foundation-module -verify %s
|
||||
|
||||
// High-level tests that DI rejects passing let constants to
|
||||
// mutating witness methods
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil %s -o /dev/null -verify
|
||||
|
||||
struct EmptyStruct {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -verify %s
|
||||
|
||||
@propertyWrapper
|
||||
final class ClassWrapper<T> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -swift-version 4 -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -swift-version 4 -emit-sil -primary-file %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -swift-version 4 -emit-sil -primary-file %s -o /dev/null -verify
|
||||
//
|
||||
// These are tests for diagnostics produced by constant propagation pass.
|
||||
// These are specific to Swift 4.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -enable-ownership-stripping-after-serialization -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
//
|
||||
// These are tests for diagnostics produced by constant propagation pass.
|
||||
// Due to the change in the implementation of Integer initializers some of the
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
//
|
||||
// These are tests for diagnostics produced by constant propagation pass
|
||||
// on floating-point operations.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
//
|
||||
// REQUIRES: !(CPU=i386 || CPU=x86_64)
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
//
|
||||
// REQUIRES: CPU=i386 || CPU=x86_64
|
||||
// UNSUPPORTED: OS=windows-msvc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
//
|
||||
// REQUIRES: PTRSIZE=32
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
//
|
||||
// REQUIRES: PTRSIZE=64
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -enforce-exclusivity=checked -swift-version 4 -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -enforce-exclusivity=checked -swift-version 4 -emit-sil -primary-file %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -enforce-exclusivity=checked -swift-version 4 -emit-sil -primary-file %s -o /dev/null -verify
|
||||
|
||||
import Swift
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -import-objc-header %S/Inputs/optional_closure_bridging.h -enforce-exclusivity=checked -swift-version 4 -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -import-objc-header %S/Inputs/optional_closure_bridging.h -enforce-exclusivity=checked -swift-version 4 -emit-sil -primary-file %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -import-objc-header %S/Inputs/optional_closure_bridging.h -enforce-exclusivity=checked -swift-version 4 -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
import Foundation
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
//
|
||||
// Tests for yield-once diagnostics emitted for generalized accessors.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify
|
||||
|
||||
func a() { // expected-warning {{all paths through this function will call itself}}
|
||||
a()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil %s -verify
|
||||
// RUN: %target-swift-frontend -emit-sil %s -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil %s -verify
|
||||
|
||||
func takesEscaping(_: @escaping () -> ()) {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -sil-verify-all -primary-file %s -emit-sil -o - -verify | %FileCheck %s
|
||||
// RUN: %target-swift-frontend -sil-verify-all -primary-file %s -emit-sil -o - -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -sil-verify-all -primary-file %s -emit-sil -o - -verify
|
||||
|
||||
// These tests are deliberately shallow, because I do not want to depend on the
|
||||
// specifics of SIL generation, which might change for reasons unrelated to this
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -sil-verify-all -emit-sil %s -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -sil-verify-all -emit-sil %s -o /dev/null -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -sil-verify-all -emit-sil %s -o /dev/null -verify
|
||||
|
||||
@_transparent func waldo(_ x: Double) -> Double {
|
||||
return fred(x); // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 1 {{while inlining here}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -emit-sil %s -verify
|
||||
// RUN: %target-swift-frontend -emit-sil %s -verify -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -emit-sil %s -verify
|
||||
|
||||
func test0(a: (() -> ()) -> (), b: () -> ()) {
|
||||
a(b) // expected-error {{passing a non-escaping function parameter 'b' to a call to a non-escaping function parameter can allow re-entrant modification of a variable}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -parse-stdlib -emit-sil -verify %s
|
||||
// RUN: %target-swift-frontend -parse-stdlib -emit-sil -verify %s -enable-ownership-stripping-after-serialization
|
||||
// RUN: %target-swift-frontend -parse-stdlib -emit-sil -verify %s
|
||||
|
||||
import Swift
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %target-swift-frontend -enable-experimental-static-assert -emit-sil %s -verify
|
||||
// RUN: %target-swift-frontend -enable-experimental-static-assert -enable-ownership-stripping-after-serialization -emit-sil %s -verify
|
||||
// RUN: %target-swift-frontend -enable-experimental-static-assert -emit-sil %s -verify
|
||||
// REQUIRES: asserts
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: not %target-swift-frontend -enable-experimental-static-assert -emit-sil %s 2>&1 | %FileCheck %s
|
||||
// RUN: not %target-swift-frontend -enable-experimental-static-assert -enable-ownership-stripping-after-serialization -emit-sil %s 2>&1 | %FileCheck %s
|
||||
// RUN: not %target-swift-frontend -enable-experimental-static-assert -emit-sil %s 2>&1 | %FileCheck %s
|
||||
|
||||
// This is a special FileCheck test for testing that we properly catch that we
|
||||
// are recursing here. The reason why this is separate from the other
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend %s -enable-ownership-stripping-after-serialization -emit-sil -verify
|
||||
// RUN: %target-swift-frontend %s -emit-sil -verify
|
||||
|
||||
class TuringMachine {
|
||||
func halt() -> Never {
|
||||
|
||||
@@ -87,11 +87,6 @@ static llvm::cl::opt<bool> DisableSILOwnershipVerifier(
|
||||
llvm::cl::desc(
|
||||
"Do not verify SIL ownership invariants during SIL verification"));
|
||||
|
||||
static llvm::cl::opt<bool> EnableOwnershipLoweringAfterDiagnostics(
|
||||
"enable-ownership-lowering-after-diagnostics",
|
||||
llvm::cl::desc("Enable ownership lowering after diagnostics"),
|
||||
llvm::cl::init(false));
|
||||
|
||||
static llvm::cl::opt<bool>
|
||||
EnableSILOpaqueValues("enable-sil-opaque-values",
|
||||
llvm::cl::desc("Compile the module with sil-opaque-values enabled."));
|
||||
@@ -375,8 +370,6 @@ int main(int argc, char **argv) {
|
||||
if (OptimizationGroup != OptGroup::Diagnostics)
|
||||
SILOpts.OptMode = OptimizationMode::ForSpeed;
|
||||
SILOpts.VerifySILOwnership = !DisableSILOwnershipVerifier;
|
||||
SILOpts.StripOwnershipAfterSerialization =
|
||||
EnableOwnershipLoweringAfterDiagnostics;
|
||||
SILOpts.OptRecordFile = RemarksFilename;
|
||||
SILOpts.OptRecordPasses = RemarksPasses;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user