Files
swift-mirror/test/IRGen/static-libclosure.swift
Saleem Abdulrasool c0993d466d IRGen: honour -static-libclosure in block creation
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.
2025-05-24 08:23:42 -07:00

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)