Files
swift-mirror/test/ClangImporter/Inputs/objc_init_blocks.h
Andrew Trick c112e03a32 Fix initialization of imported ObjC block types.
This fixes a SIL ownership verification error when importing structs like:

typedef bool (^boolBlock)(void);

struct objc_bool_block {
  __unsafe_unretained boolBlock block;
};

Fixes rdar://126142109 (Found an operand with a value that is not compatible
with the operand's operand ownership kind map)
2024-05-10 17:45:11 -07:00

8 lines
144 B
Objective-C

#import <CoreFoundation/CoreFoundation.h>
typedef bool (^boolBlock)(void);
struct objc_bool_block {
__unsafe_unretained boolBlock block;
};