1*f4a2713aSLionel Sambuc // REQUIRES: x86-registered-target 2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -g -S %s -o - 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc // rdar://7590323 5*f4a2713aSLionel Sambuc typedef struct dispatch_queue_s *dispatch_queue_t; 6*f4a2713aSLionel Sambuc __attribute__((visibility("default"))) 7*f4a2713aSLionel Sambuc extern struct dispatch_queue_s _dispatch_main_q; 8*f4a2713aSLionel Sambuc typedef struct dispatch_item_s *dispatch_item_t; 9*f4a2713aSLionel Sambuc typedef void (^dispatch_legacy_block_t)(dispatch_item_t); LEGACY_dispatch_call(dispatch_queue_t dq,dispatch_legacy_block_t dispatch_block,dispatch_legacy_block_t callback_block)10*f4a2713aSLionel Sambucdispatch_item_t LEGACY_dispatch_call(dispatch_queue_t dq, 11*f4a2713aSLionel Sambuc dispatch_legacy_block_t dispatch_block, 12*f4a2713aSLionel Sambuc dispatch_legacy_block_t callback_block) { 13*f4a2713aSLionel Sambuc dispatch_queue_t lq = _dispatch_queue_get_current() ?: (&_dispatch_main_q); 14*f4a2713aSLionel Sambuc dispatch_async(dq, ^{ 15*f4a2713aSLionel Sambuc if (callback_block) { 16*f4a2713aSLionel Sambuc dispatch_async(lq, ^{ 17*f4a2713aSLionel Sambuc } 18*f4a2713aSLionel Sambuc ); 19*f4a2713aSLionel Sambuc } 20*f4a2713aSLionel Sambuc } 21*f4a2713aSLionel Sambuc ); 22*f4a2713aSLionel Sambuc } 23*f4a2713aSLionel Sambuc 24*f4a2713aSLionel Sambuc // radar://9008853 25*f4a2713aSLionel Sambuc typedef struct P { 26*f4a2713aSLionel Sambuc int x; 27*f4a2713aSLionel Sambuc } PS; 28*f4a2713aSLionel Sambuc # 1 "" foo()29*f4a2713aSLionel Sambucvoid foo() { 30*f4a2713aSLionel Sambuc PS p2; 31*f4a2713aSLionel Sambuc } 32