brintos

brintos / llvm-project-archived public Read only

0
0
Text · 486 B · a967dee Raw
22 lines · plain
1#import <Foundation/Foundation.h>2#if __has_include(<AppKit/AppKit.h>)3#import <AppKit/AppKit.h>4#define XXView NSView5#else6#import <UIKit/UIKit.h>7#define XXView UIView8#endif9 10int main() {11  XXView *view = [[XXView alloc] init];12  dispatch_group_t g = dispatch_group_create();13  dispatch_group_enter(g);14  [NSThread detachNewThreadWithBlock:^{15    @autoreleasepool {16      [view superview];17    }18    dispatch_group_leave(g);19  }];20  dispatch_group_wait(g, DISPATCH_TIME_FOREVER);21}22