[cfe-commits] r156106 - in /cfe/trunk: lib/Rewrite/ test/Rewriter/

Fariborz Jahanian fjahanian at apple.com
Thu May 3 14:44:13 PDT 2012


Author: fjahanian
Date: Thu May  3 16:44:12 2012
New Revision: 156106

URL: http://llvm.org/viewvc/llvm-project?rev=156106&view=rev
Log:
modern objc translator: used size_t in couple
of places. // rdar://11375908

Modified:
    cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp
    cfe/trunk/test/Rewriter/objc-bool-literal-modern-1.mm
    cfe/trunk/test/Rewriter/rewrite-block-literal-1.mm
    cfe/trunk/test/Rewriter/rewrite-block-literal.mm
    cfe/trunk/test/Rewriter/rewrite-block-pointer.mm
    cfe/trunk/test/Rewriter/rewrite-byref-in-nested-blocks.mm
    cfe/trunk/test/Rewriter/rewrite-foreach-in-block.mm
    cfe/trunk/test/Rewriter/rewrite-modern-block-consts.mm
    cfe/trunk/test/Rewriter/rewrite-modern-block.mm
    cfe/trunk/test/Rewriter/rewrite-modern-extern-c-func-decl.mm
    cfe/trunk/test/Rewriter/rewrite-modern-typeof.mm
    cfe/trunk/test/Rewriter/rewrite-nested-blocks-1.mm
    cfe/trunk/test/Rewriter/rewrite-nested-blocks-2.mm
    cfe/trunk/test/Rewriter/rewrite-nested-blocks.mm
    cfe/trunk/test/Rewriter/rewrite-nested-property-in-blocks.mm
    cfe/trunk/test/Rewriter/rewrite-rewritten-initializer.mm
    cfe/trunk/test/Rewriter/rewrite-unique-block-api.mm

Modified: cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp Thu May  3 16:44:12 2012
@@ -4053,8 +4053,8 @@
                                                    unsigned hasCopy) {
   std::string S = "\nstatic struct " + DescTag;
   
-  S += " {\n  unsigned long reserved;\n";
-  S += "  unsigned long Block_size;\n";
+  S += " {\n  size_t reserved;\n";
+  S += "  size_t Block_size;\n";
   if (hasCopy) {
     S += "  void (*copy)(struct ";
     S += ImplTag; S += "*, struct ";

Modified: cfe/trunk/test/Rewriter/objc-bool-literal-modern-1.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/objc-bool-literal-modern-1.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/objc-bool-literal-modern-1.mm (original)
+++ cfe/trunk/test/Rewriter/objc-bool-literal-modern-1.mm Thu May  3 16:44:12 2012
@@ -2,6 +2,9 @@
 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"__declspec(X)=" %t-rw.cpp
 // rdar://11231426
 
+// rdar://11375908
+typedef unsigned long size_t;
+
 typedef bool BOOL;
 
 BOOL yes() {

Modified: cfe/trunk/test/Rewriter/rewrite-block-literal-1.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-block-literal-1.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-block-literal-1.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-block-literal-1.mm Thu May  3 16:44:12 2012
@@ -5,6 +5,9 @@
 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
 // rdar://11259664
 
+// rdar://11375908
+typedef unsigned long size_t;
+
 void *sel_registerName(const char *);
 typedef void (^BLOCK_TYPE)(void);
 

Modified: cfe/trunk/test/Rewriter/rewrite-block-literal.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-block-literal.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-block-literal.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-block-literal.mm Thu May  3 16:44:12 2012
@@ -5,6 +5,9 @@
 // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
 
+// rdar://11375908
+typedef unsigned long size_t;
+
 // rdar: // 11006566
 
 void I( void (^)(void));

Modified: cfe/trunk/test/Rewriter/rewrite-block-pointer.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-block-pointer.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-block-pointer.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-block-pointer.mm Thu May  3 16:44:12 2012
@@ -4,6 +4,9 @@
 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
 // radar 7638400
 
+// rdar://11375908
+typedef unsigned long size_t;
+
 typedef void * id;
 void *sel_registerName(const char *);
 

Modified: cfe/trunk/test/Rewriter/rewrite-byref-in-nested-blocks.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-byref-in-nested-blocks.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-byref-in-nested-blocks.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-byref-in-nested-blocks.mm Thu May  3 16:44:12 2012
@@ -4,6 +4,9 @@
 // RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"SEL=void*" -U__declspec  -D"__declspec(X)=" %t-modern-rw.cpp
 // radar 7692350
 
+// rdar://11375908
+typedef unsigned long size_t;
+
 void f(void (^block)(void));
 
 @interface X {

Modified: cfe/trunk/test/Rewriter/rewrite-foreach-in-block.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-foreach-in-block.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-foreach-in-block.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-foreach-in-block.mm Thu May  3 16:44:12 2012
@@ -4,6 +4,8 @@
 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
 // rdar:// 9878420
 
+typedef unsigned long size_t;
+
 void objc_enumerationMutation(id);
 void *sel_registerName(const char *);
 typedef void (^CoreDAVCompletionBlock)(void);

Modified: cfe/trunk/test/Rewriter/rewrite-modern-block-consts.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-modern-block-consts.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-modern-block-consts.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-modern-block-consts.mm Thu May  3 16:44:12 2012
@@ -2,6 +2,9 @@
 // RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -U__declspec -D"__declspec(X)=" %t-modern-rw.cpp
 // rdar:// 8243071
 
+// rdar://11375908
+typedef unsigned long size_t;
+
 void x(int y) {}
 void f() {
     const int bar = 3;

Modified: cfe/trunk/test/Rewriter/rewrite-modern-block.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-modern-block.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-modern-block.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-modern-block.mm Thu May  3 16:44:12 2012
@@ -2,6 +2,7 @@
 // RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp
 // rdar://11230308
 
+typedef unsigned long size_t;
 typedef struct {
     char byte0;
     char byte1;

Modified: cfe/trunk/test/Rewriter/rewrite-modern-extern-c-func-decl.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-modern-extern-c-func-decl.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-modern-extern-c-func-decl.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-modern-extern-c-func-decl.mm Thu May  3 16:44:12 2012
@@ -2,6 +2,7 @@
 // RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -Wno-attributes -D"Class=void*" -D"id=void*" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp
 // rdar://11131490
 
+typedef unsigned long size_t;
 extern "C" __declspec(dllexport) void BreakTheRewriter(void) {
         __block int aBlockVariable = 0;
         void (^aBlock)(void) = ^ {

Modified: cfe/trunk/test/Rewriter/rewrite-modern-typeof.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-modern-typeof.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-modern-typeof.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-modern-typeof.mm Thu May  3 16:44:12 2012
@@ -2,6 +2,7 @@
 // RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -Wno-attributes -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
 
+typedef unsigned long size_t;
 extern "C" {
 extern "C" void *_Block_copy(const void *aBlock);
 extern "C" void _Block_release(const void *aBlock);

Modified: cfe/trunk/test/Rewriter/rewrite-nested-blocks-1.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-nested-blocks-1.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-nested-blocks-1.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-nested-blocks-1.mm Thu May  3 16:44:12 2012
@@ -4,6 +4,7 @@
 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
 // radar 7696893
 
+typedef unsigned long size_t;
 void *sel_registerName(const char *);
 
 void f(void (^block)(void));

Modified: cfe/trunk/test/Rewriter/rewrite-nested-blocks-2.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-nested-blocks-2.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-nested-blocks-2.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-nested-blocks-2.mm Thu May  3 16:44:12 2012
@@ -6,6 +6,7 @@
 // grep "static void __FUNC_block_copy_" %t-modern-rw.cpp | count 2
 // rdar://8499592
 
+typedef unsigned long size_t;
 void Outer(void (^bk)());
 void Inner(void (^bk)());
 void INNER_FUNC(id d);

Modified: cfe/trunk/test/Rewriter/rewrite-nested-blocks.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-nested-blocks.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-nested-blocks.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-nested-blocks.mm Thu May  3 16:44:12 2012
@@ -5,6 +5,7 @@
 // radar 7682149
 
 
+typedef unsigned long size_t;
 void f(void (^block)(void));
 
 @interface X {

Modified: cfe/trunk/test/Rewriter/rewrite-nested-property-in-blocks.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-nested-property-in-blocks.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-nested-property-in-blocks.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-nested-property-in-blocks.mm Thu May  3 16:44:12 2012
@@ -4,6 +4,7 @@
 // RUN: %clang_cc1 -fsyntax-only -fms-extensions -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
 // radar 8608293
 
+typedef unsigned long size_t;
 void *sel_registerName(const char *);
 
 extern "C" void nowarn(id);

Modified: cfe/trunk/test/Rewriter/rewrite-rewritten-initializer.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-rewritten-initializer.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-rewritten-initializer.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-rewritten-initializer.mm Thu May  3 16:44:12 2012
@@ -4,6 +4,7 @@
 // RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw-modern.cpp
 // radar 7669784
 
+typedef unsigned long size_t;
 typedef void * id;
 void *sel_registerName(const char *);
 

Modified: cfe/trunk/test/Rewriter/rewrite-unique-block-api.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-unique-block-api.mm?rev=156106&r1=156105&r2=156106&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-unique-block-api.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-unique-block-api.mm Thu May  3 16:44:12 2012
@@ -4,6 +4,7 @@
 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
 // radar 7630551
 
+typedef unsigned long size_t;
 void f(void (^b)(char c));
 
 @interface a





More information about the cfe-commits mailing list