mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When creating a block, ensure that we correctly associate the DLL Storage on the `_NSConcreteStackBlock` root object declaration based upon whether we are generating code with `-static-libclosure` being passed to the clang importer or not.
10 lines
461 B
Swift
10 lines
461 B
Swift
// RUN: %swift_frontend_plain -target x86_64-unknown-windows-msvc -primary-file %s -parse-as-library -parse-stdlib -nostdimport -module-name M -emit-ir -Xcc -static-libclosure -o - | %FileCheck %s
|
|
|
|
public let block: @convention(block) () -> () = {
|
|
}
|
|
|
|
// CHECK-NOT: @_NSConcreteStackBlock = external dllimport global
|
|
// CHECK-NOT: declare dllimport ptr @_Block_copy(ptr)
|
|
// CHECK: @_NSConcreteStackBlock = external global
|
|
// CHECK: declare ptr @_Block_copy(ptr)
|