mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This was causing the importer to complain about not being able to map 'dispatch_sync' to 'DispatchQueue.sync(self:execute:)', but only when building the PCM for our mock Dispatch. That meant that it depended on the test order whether we'd see issues---if the first test to build the module didn't check for warnings in other files, it would slip by. This was usually blocks_parse.swift. rdar://problem/30475805
31 lines
994 B
Objective-C
31 lines
994 B
Objective-C
#import <objc/NSObject.h>
|
|
|
|
@protocol OS_dispatch_object <NSObject>
|
|
@end
|
|
@interface OS_dispatch_object: NSObject <OS_dispatch_object>
|
|
@end
|
|
typedef OS_dispatch_object *dispatch_object_t;
|
|
|
|
@protocol OS_dispatch_queue <OS_dispatch_object>
|
|
@end
|
|
@interface OS_dispatch_queue: OS_dispatch_object <OS_dispatch_object>
|
|
@end
|
|
typedef OS_dispatch_queue *dispatch_queue_t;
|
|
|
|
@protocol OS_dispatch_source <OS_dispatch_object>
|
|
@end
|
|
@interface OS_dispatch_source: OS_dispatch_object <OS_dispatch_object>
|
|
@end
|
|
typedef OS_dispatch_source *dispatch_source_t;
|
|
|
|
typedef void (^dispatch_block_t)(void);
|
|
|
|
dispatch_queue_t dispatch_get_current_queue(void);
|
|
void dispatch_async(dispatch_queue_t q, dispatch_block_t) __attribute__((nonnull));
|
|
|
|
void dispatch_sync(dispatch_queue_t q,
|
|
__attribute__((noescape)) dispatch_block_t) __attribute__((nonnull));
|
|
|
|
void dispatch_retain(dispatch_object_t object) __attribute__((nonnull));
|
|
void dispatch_release(dispatch_object_t object) __attribute__((nonnull));
|