[llvm-commits] [llvm-gcc-4.2] r110671 - /llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-5988451.c

Bill Wendling isanbard at gmail.com
Tue Aug 10 04:09:39 PDT 2010


Author: void
Date: Tue Aug 10 06:09:39 2010
New Revision: 110671

URL: http://llvm.org/viewvc/llvm-project?rev=110671&view=rev
Log:
Adjust testcase to match current apis.

Modified:
    llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-5988451.c

Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-5988451.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-5988451.c?rev=110671&r1=110670&r2=110671&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-5988451.c (original)
+++ llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-5988451.c Tue Aug 10 06:09:39 2010
@@ -6,17 +6,13 @@
 typedef struct dispatch_queue_s *dispatch_queue_t;
 typedef struct dispatch_item_s *dispatch_item_t;
 
-typedef void (^dispatch_block_t)(dispatch_item_t item);
-
 void dispatch_call(dispatch_queue_t queue,
- dispatch_block_t work,
- dispatch_block_t completion,
- void* context,
- dispatch_item_t *item);
-
-void dispatch_apply_wait(dispatch_block_t work,
-     unsigned iterations,
-     void *context);
+                   dispatch_legacy_block_t work,
+                   dispatch_legacy_block_t completion);
+
+void dispatch_apply_wait(dispatch_legacy_block_t work,
+                         unsigned iterations,
+                         void *context);
 
 
 
@@ -34,15 +30,14 @@
 {
   dispatch_queue_t queue;
 
-  dispatch_call(queue,
+  dispatch_call(queue, /* { dg-warning "deprecated" } */
     ^(dispatch_item_t item) {
       dispatch_apply_wait(^(dispatch_item_t item) {
                             [NSValue valueWithPointer:self];
                           },
                           10,NULL);
     },
-    ^(dispatch_item_t item) {NSLog(@"test");},
-    NULL, NULL);
+    ^(dispatch_item_t item) {NSLog(@"test");});  /* { dg-warning "deprecated" } */
 }
 
 





More information about the llvm-commits mailing list