Author: fjahanian
Date: Mon Mar 19 13:11:32 2012
New Revision: 153043

URL: http://llvm.org/viewvc/llvm-project?rev=153043&view=rev
Log:
modern objective-c translator: fix type of objc_exception_throw
declaration and its siblings.

Modified:
    cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp
    cfe/trunk/test/Rewriter/rewrite-modern-synchronized.m
    cfe/trunk/test/Rewriter/rewrite-modern-throw.m
    cfe/trunk/test/Rewriter/rewrite-modern-try-catch-finally.m
    cfe/trunk/test/Rewriter/rewrite-modern-try-finally.m

Modified: cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp?rev=153043&r1=153042&r2=153043&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp Mon Mar 19 13:11:32 2012
@@ -5162,15 +5162,15 @@
   Preamble += "(struct objc_class *);\n";
   Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_getMetaClass";
   Preamble += "(const char *);\n";
-  Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_throw(id);\n";
+  Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_throw( struct 
objc_object *);\n";
   Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_try_enter(void *);\n";
   Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_try_exit(void *);\n";
   Preamble += "__OBJC_RW_DLLIMPORT struct objc_object 
*objc_exception_extract(void *);\n";
   Preamble += "__OBJC_RW_DLLIMPORT int objc_exception_match";
   Preamble += "(struct objc_class *, struct objc_object *);\n";
   // @synchronized hooks.
-  Preamble += "__OBJC_RW_DLLIMPORT void objc_sync_enter(id);\n";
-  Preamble += "__OBJC_RW_DLLIMPORT void objc_sync_exit(id);\n";
+  Preamble += "__OBJC_RW_DLLIMPORT void objc_sync_enter( struct objc_object 
*);\n";
+  Preamble += "__OBJC_RW_DLLIMPORT void objc_sync_exit( struct objc_object 
*);\n";
   Preamble += "__OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char 
*);\n";
   Preamble += "#ifndef __FASTENUMERATIONSTATE\n";
   Preamble += "struct __objcFastEnumerationState {\n\t";

Modified: cfe/trunk/test/Rewriter/rewrite-modern-synchronized.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-modern-synchronized.m?rev=153043&r1=153042&r2=153043&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-modern-synchronized.m (original)
+++ cfe/trunk/test/Rewriter/rewrite-modern-synchronized.m Mon Mar 19 13:11:32 
2012
@@ -1,5 +1,10 @@
 // RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions 
-rewrite-objc %s -o %t-rw.cpp
-// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -fexceptions  
-Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" 
%t-rw.cpp
+// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -fexceptions  
-Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
+
+typedef struct objc_class *Class;
+typedef struct objc_object {
+    Class isa;
+} *id;
 
 void *sel_registerName(const char *);
 

Modified: cfe/trunk/test/Rewriter/rewrite-modern-throw.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-modern-throw.m?rev=153043&r1=153042&r2=153043&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-modern-throw.m (original)
+++ cfe/trunk/test/Rewriter/rewrite-modern-throw.m Mon Mar 19 13:11:32 2012
@@ -1,5 +1,10 @@
 // RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions 
-rewrite-objc %s -o %t-rw.cpp
-// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -fexceptions  
-Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" 
%t-rw.cpp
+// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -fexceptions  
-Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
+
+typedef struct objc_class *Class;
+typedef struct objc_object {
+    Class isa;
+} *id;
 
 void *sel_registerName(const char *);
 

Modified: cfe/trunk/test/Rewriter/rewrite-modern-try-catch-finally.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-modern-try-catch-finally.m?rev=153043&r1=153042&r2=153043&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-modern-try-catch-finally.m (original)
+++ cfe/trunk/test/Rewriter/rewrite-modern-try-catch-finally.m Mon Mar 19 
13:11:32 2012
@@ -1,5 +1,10 @@
 // RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions 
-rewrite-objc %s -o %t-rw.cpp
-// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -fexceptions  
-Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" 
%t-rw.cpp
+// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -fexceptions  
-Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
+
+typedef struct objc_class *Class;
+typedef struct objc_object {
+    Class isa;
+} *id;
 
 extern int printf(const char *, ...);
 

Modified: cfe/trunk/test/Rewriter/rewrite-modern-try-finally.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-modern-try-finally.m?rev=153043&r1=153042&r2=153043&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-modern-try-finally.m (original)
+++ cfe/trunk/test/Rewriter/rewrite-modern-try-finally.m Mon Mar 19 13:11:32 
2012
@@ -1,5 +1,10 @@
 // RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions 
-rewrite-objc %s -o %t-rw.cpp
-// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -fexceptions  
-Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" 
%t-rw.cpp
+// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -fexceptions  
-Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
+
+typedef struct objc_class *Class;
+typedef struct objc_object {
+    Class isa;
+} *id;
 
 void FINALLY();
 void TRY();


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to