Skip to content

[ownership] Enable ownership verification by default. #23530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down Expand Up @@ -344,7 +343,6 @@ function (swift_benchmark_compile_archopts)

set(common_options_driver
"-c"
"-Xfrontend" "-verify-sil-ownership"
"-target" "${target}"
"-${driver_opt}")

Expand Down
1 change: 0 additions & 1 deletion cmake/modules/SwiftSource.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion include/swift/AST/SILOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class SILOptions {
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;
Expand Down
4 changes: 2 additions & 2 deletions include/swift/Option/FrontendOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -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">;
Expand Down
2 changes: 1 addition & 1 deletion lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/ClangImporter/optional.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/objc_dealloc.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/Interpreter/enforce_exclusive_access.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/Misc/tbi.sil
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/PrintAsObjC/blocks.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions test/PrintAsObjC/extensions.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/Profiler/pgo_switchenum.swift
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/Parser/borrow_argument.sil
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/SIL/Parser/ownership_arguments.sil
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions test/SIL/Serialization/borrow_argument.sil
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions test/SIL/Serialization/literals.sil
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/arguments.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/cond_br_crash.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/cond_br_no_crash.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/definite_init.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/false_positive_leaks.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/leaks.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/objc_use_verifier.sil
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/opaque_use_verifier.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/over_consume.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/over_consume_positive.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/SIL/ownership-verifier/subobject_borrowing.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/unreachable_code.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/ownership-verifier/use_verifier.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/SILGen/addressors.swift
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions test/SILGen/builtins.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions test/SILGen/closure_script_global_escape.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions test/SILGen/closure_self_recursion.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
10 changes: 5 additions & 5 deletions test/SILGen/conditionally_unreachable.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions test/SILGen/default_arguments_serialized.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion test/SILGen/enum_default_arguments.swift
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
4 changes: 2 additions & 2 deletions test/SILGen/existential_erasure_mutating_covariant_self.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/SILGen/function_conversion.swift
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion test/SILGen/functions_uninhabited_param.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions test/SILGen/generic_witness.swift
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions test/SILGen/ivar_destroyer_resilience.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Loading