Files
swift-mirror/test/IRGen/function_param_convention.sil
Saleem Abdulrasool d746a6d1db tests: annotate dllstorage on IRGen tests
This adds the dllstorage annotations on the tests.  This first pass gets
most of the IRGen tests passing on Windows (though has dependencies on
other changes).  However, this allows for the changes to be merged more
easily as we cannot regress other platforms here.
2018-04-23 20:21:10 -07:00

20 lines
821 B
Plaintext

// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s -module-name Test | %FileCheck %s
import Builtin
struct X {
init()
var x : Builtin.Int32
}
// Make sure we can irgen a SIL function with various parameter attributes
// without choking. This is just a basic reality check.
// CHECK: define{{( dllexport)?}}{{( protected)?}} swiftcc void @foo(%T4Test1XV* noalias nocapture sret, %T4Test1XV* noalias nocapture dereferenceable({{.*}}), %T4Test1XV* nocapture dereferenceable({{.*}}), %T4Test1XV* noalias nocapture dereferenceable({{.*}}), i32, i32, i32) {{.*}} {
sil @foo : $@convention(thin) (@in X, @inout X, @in_guaranteed X, @owned X, X, @guaranteed X) -> @out X {
bb0(%0 : $*X, %1 : $*X, %2 : $*X, %3 : $*X, %4 : $X, %5 : $X, %6 : $X):
%9999 = tuple()
return %9999 : $()
}