mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
lit.py currently allows any substring of `target_triple` to be used as a feature in REQUIRES/UNSUPPORTED/XFAIL. This results in various forms of the OS spread across the tests and is also somewhat confusing since they aren't actually listed in the available features. Modify all OS-related features to use the `OS=` version that Swift adds instead. We can later remove `config.target_triple` so that these don't the non-OS versions don't work in the first place.
42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
// RUN: %target-swift-frontend -module-name=test -Onone -emit-ir %s | %FileCheck %s
|
|
|
|
// CHECK-DAG: define linkonce_odr hidden swiftcc void @shared_external_test()
|
|
// CHECK-DAG: declare {{(dllimport )?}}swiftcc void @public_external_test()
|
|
// Non-public external symbols are emitted into clients.
|
|
// CHECK-DAG: declare swiftcc void @hidden_external_test()
|
|
// CHECK-NOT: public_external_unused_test
|
|
|
|
// TODO: update check line for the hidden_external_test for Windows.
|
|
// UNSUPPORTED: OS=windows-msvc
|
|
|
|
sil public_external [serialized] @public_external_test : $@convention(thin) () -> () {
|
|
%0 = tuple()
|
|
return %0 : $()
|
|
}
|
|
|
|
sil hidden_external @hidden_external_test : $@convention(thin) () -> ()
|
|
|
|
sil shared @shared_external_test : $@convention(thin) () -> () {
|
|
%0 = tuple()
|
|
return %0 : $()
|
|
}
|
|
|
|
sil public_external [serialized] @public_external_unused_test : $@convention(thin) () -> () {
|
|
%0 = tuple()
|
|
return %0 : $()
|
|
}
|
|
|
|
sil public @use_all_symbols : $@convention(thin) () -> () {
|
|
%0 = function_ref @public_external_test : $@convention(thin) () -> ()
|
|
%1 = function_ref @hidden_external_test : $@convention(thin) () -> ()
|
|
%2 = function_ref @shared_external_test : $@convention(thin) () -> ()
|
|
|
|
apply %0() : $@convention(thin) () -> ()
|
|
apply %1() : $@convention(thin) () -> ()
|
|
apply %2() : $@convention(thin) () -> ()
|
|
|
|
%24 = tuple()
|
|
return %24 : $()
|
|
}
|
|
|