]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libobjc/exception.c
In libobjc/: 2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>
[thirdparty/gcc.git] / libobjc / exception.c
index a221a3e77e30fb70878e10d0ad8d0ccc6eefa897..4883448afad89583b3b36015cb0690b1be7f1dd6 100644 (file)
@@ -25,7 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #include "objc-private/common.h"
 #include <stdlib.h>
 #include "config.h"
-#include "objc/objc-api.h"
+#include "objc/runtime.h"
 #include "objc/objc-exception.h"
 #include "unwind.h"
 #include "unwind-pe.h"
@@ -57,7 +57,7 @@ is_kind_of_exception_matcher (Class catch_class, id exception)
       Class c;
 
       for (c = exception->class_pointer; c != Nil; 
-          c = class_get_super_class (c))
+          c = class_getSuperclass (c))
        if (c == catch_class)
          return 1;
     }
@@ -191,9 +191,11 @@ get_ttype_entry (struct lsda_header_info *info, _uleb128_t i)
   
   ptr = (_Unwind_Ptr) (info->TType - (i * 4));
   ptr = _Unwind_decode_target2 (ptr);
-  
+
+  /* NULL ptr means catch-all.  Note that if the class is not found,
+     this will abort the program.  */
   if (ptr)
-    return objc_get_class ((const char *) ptr);
+    return objc_getRequiredClass ((const char *) ptr);
   else
     return 0;
 }
@@ -209,9 +211,10 @@ get_ttype_entry (struct lsda_header_info *info, _Unwind_Word i)
   read_encoded_value_with_base (info->ttype_encoding, info->ttype_base,
                                info->TType - i, &ptr);
 
-  /* NULL ptr means catch-all.  */
+  /* NULL ptr means catch-all.  Note that if the class is not found,
+     this will abort the program.  */
   if (ptr)
-    return objc_get_class ((const char *) ptr);
+    return objc_getRequiredClass ((const char *) ptr);
   else
     return 0;
 }