Files
swift-mirror/test/Serialization/basic_sil.swift
Michael Gottesman be568902f2 [ownership] Always print out ownership argument annotations whether or not -enable-sil-ownership is passed in.
This is how we originally controlled whether or not we printed out ownership
annotations when we printed SIL. Since then, I have changed (a few months ago I
believe) the ownership model eliminator to know how to eliminate these
annotations from the SIL itself. So this hack can be removed.

As an additional benefit, this will let me rename -enable-sil-ownership to
-enable-sil-ownership-verifier. This will I hope eliminate confusion around this
option in the short term while I am preparing to work on semantic sil again.

rdar://42509812
2018-07-24 13:18:37 -07:00

19 lines
829 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-build-swift -Xfrontend -assume-parsing-unqualified-ownership-sil -emit-module -Xfrontend -disable-diagnostic-passes -force-single-frontend-invocation -Xfrontend -enable-objc-interop -o %t/def_basic.swiftmodule %S/Inputs/def_basic.sil
// RUN: llvm-bcanalyzer %t/def_basic.swiftmodule | %FileCheck %s
// RUN: %target-build-swift -emit-sil -I %t %s -o %t/basic_sil.sil
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -I %t %t/basic_sil.sil -performance-linker | %FileCheck %S/Inputs/def_basic.sil
// This test currently is written such that no optimizations are assumed.
// REQUIRES: swift_test_mode_optimize_none
// CHECK-NOT: UnknownCode
// Inputs/def_basic.sil is based on basic.sil under test/SIL/Parser.
import def_basic
func test_all() {
serialize_all()
}